[ncl-talk] Issue with shapefile highways showing up on map

Rick Brownrigg brownrig at ucar.edu
Sun Aug 20 21:36:25 MDT 2023


Andrew, would you mind sending me that shapefile?

Rick


On Sun, Aug 20, 2023 at 5:59 PM Dave Allured - NOAA Affiliate via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Andrew said that didn't work.  Does anyone else have an idea about this
> failure to plot polylines?
>
>
> On Sun, Aug 20, 2023 at 4:18 PM Dave Allured - NOAA Affiliate <
> dave.allured at noaa.gov> wrote:
>
>> This might be a known issue, swapped X and Y coordinates in the shapefile
>> reader.  Verify by changing your plot region, and see if the features show
>> up in a different place on the globe.  The alternate location is
>> predictable.
>> https://github.com/NCAR/ncl/issues/176
>>
>> This was never fully investigated.  This may be due to a version update
>> in one of the support libraries, such as GDAL, on your new machine.  There
>> is a suggested workaround in that issue.
>>
>>
>> On Sun, Aug 20, 2023 at 3:30 PM Andrew Kren - NOAA Federal via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>>> Hi there,
>>>
>>> For some reason I am running into issues with my highways not showing up
>>> when trying to plot them. As a context, we moved the scripts to a new
>>> computer. The old computer has the same code and it worked fine. Now when
>>> we installed NCL on the new machine, the script runs but does not plot the
>>> polylines.
>>>
>>> I have been using gsn_add_shapefile_polylines_subset to plot a select
>>> number of highways. I verified that the function is reading correctly, and
>>> there are no error messages showing up when running NCL. I am at a loss for
>>> what could be going on. Here is a snippet of my code where I plot the
>>> highways:
>>>
>>>  if (plot_highways.eq."Yes".or.plot_highways.eq."yes") then
>>>       ; add highways
>>>       ;---Section to add polylines to map.
>>>       plres_high             = True           ; resource list for
>>> polylines
>>>       colors_hwy = highway_colors
>>>       ;plres at gsLineColor = "(/0.66, 0.66, 0.66/)"
>>>        plres at gsEdgesOn = True
>>>        plres at gsFillColor = "transparent"
>>>        plres at gsFillOpacityF = 0.0
>>>       plres_high at gsLineThicknessF = 2.0
>>>       highways = highway_names
>>>       poly_high =
>>> gsn_add_shapefile_polylines_subset(wks,plot,SHAPE_DIR+shapefile_file,shapefile_descriptor,highways,colors_hwy,plres_high)
>>>       end if
>>>
>>> Could this be a path issue with where NCL was installed? I can't imagine
>>> it would be since it runs fine. Much appreciated for any help!
>>> --
>>>
>>> Andrew Kren
>>> Meteorologist
>>> NOAA's National Weather Service
>>> Raleigh Forecast Office
>>> 1005 Capability Drive, Suite 300
>>> Raleigh, North Carolina 27606
>>> voice: 919-326-1035
>>> mailto: andrew.kren at noaa.govhttp://www.weather.gov/rah
>>>
>>> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20230820/69ce76b1/attachment.htm>


More information about the ncl-talk mailing list