[mapserver-users] Union of two point layers from GeoJSON data on S3
David Miller
teknocreator at gmail.com
Fri Sep 11 10:19:43 PDT 2020
First note that we're using MapServer 7.2.2 to display our data from AWS S3
buckets.
We're successfully using MapServer to display point data from GeoJSON files
stored in AWS S3. What we would like to do next is to use the wind speed
attribute from one file and the wind direction attribute from another to
create a layer that displays wind barb information at those points. We
have used MapServer's uvraster capability for a such a display but these
are at grid points versus at selected locations. So, it appeared that
using MapServer's UNION layer feature could work. The UNION layer would
need the speed value for determining which wind barb symbol to use and the
direction value for the angle of the symbol. As a test, just displaying
the speed value and attempting to rotate the text with the direction value.
While I can set up the mapfile for the UNION layer to just display values
from either the speed or direction layers as a test to see if the data is
being accessed from S3 correctly, I can't seem to access both attributes
within the UNION layer. Relative parts of the mapfile:
LAYER
NAME wspdvalues #wind speed layer
TYPE POINT
STATUS OFF
CONNECTIONTYPE OGR
CONNECTION
"/vsis3/bucketname/windspd_2020-09-11T00:00_2020-09-11T01:00.json"
DATA "0"
END
LAYER
NAME wdirvalues # wind direction layer
TYPE POINT
STATUS OFF
CONNECTIONTYPE OGR
CONNECTION
"/vsis3/bucketname/winddir_2020-09-11T00:00_2020-09-11T01:00.json"
DATA "0"
END
LAYER
NAME pointtest # union layer
TYPE POINT
STATUS DEFAULT
CONNECTIONTYPE UNION
CONNECTION "wspdvalues,wdirvalues"
PROCESSING "ITEMS=spd,dir"
CLASS
STYLE
COLOR 0 255 0
SYMBOL "circle"
SIZE 3
MAXSIZE 6
END
LABEL
TEXT (tostring([spd],"%.0f"))
ANGLE [dir]
OUTLINECOLOR 0 0 0
COLOR 255 255 255
TYPE truetype
FONT arial-bold
SIZE 13
POSITION uc
BUFFER 4
PRIORITY [priority]
END
END
PROJECTION
"init=epsg:920910"
END
END
Again, this is just a first test rather than using symbols at this time.
If the GeoJSON file has spd and dir attributes in the same file and used in
one layer, then it displays fine. As we're displaying the data values
individually, we'd rather not have to duplicate this data by combining into
another file. Hence why UNION looked like it might work.
The geometry sections of each GeoJSON file are identical and in the same
order. Hopefully, just missing something.
Thanks for any help!
Dave M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20200911/7e4b9d04/attachment.htm>
More information about the MapServer-users
mailing list