[mapserver-users] Union of two point layers from GeoJSON data on S3

2020-09-11 Thread David Miller
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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] Multiple Styles for a LAYER/CLASS

2020-09-11 Thread Lime, Steve D (MNIT)
Hi Matt: Actually that syntax is supported (except for the style NAME 
attribute) and you can have multiple styles inside a class. What version are 
you using? --Steve

From: mapserver-users  On Behalf Of 
Cechini, Matthew F. (GSFC-423.0)[Science Systems & Applications, Inc.]
Sent: Friday, September 11, 2020 2:37 PM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Multiple Styles for a LAYER/CLASS


Greetings,
   I would like to provide multiple styles for the same LAYER/CLASS in our 
mapserver configuration.  Ideally that looks something like this, though of 
course this syntax isn’t currently supported.


CLASS

  NAME "Thermal Anomalies"

 STYLE

 NAME   'default'

 SYMBOL 'circle'

 COLOR  240 40 40

 OUTLINECOLOR  240 40 40

 SIZE 3

 END



 STYLE

 NAME   'blue'

 SYMBOL 'circle'

 COLOR  0 0 255

 OUTLINECOLOR  0 0 255

 SIZE 3

 END

END

   How would I accomplish this given existing functionality?

Thanks,
Matt
.
Matthew Cechini
Contractor, Science Systems and Applications, Inc.
NASA GIBS Systems/Software Engineer
410.205.6272
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] Multiple Styles for a LAYER/CLASS

2020-09-11 Thread Cechini, Matthew F. (GSFC-423.0)[Science Systems & Applications, Inc.]
Greetings,
   I would like to provide multiple styles for the same LAYER/CLASS in our 
mapserver configuration.  Ideally that looks something like this, though of 
course this syntax isn’t currently supported.


CLASS

  NAME "Thermal Anomalies"

 STYLE

 NAME   'default'

 SYMBOL 'circle'

 COLOR  240 40 40

 OUTLINECOLOR  240 40 40

 SIZE 3

 END



 STYLE

 NAME   'blue'

 SYMBOL 'circle'

 COLOR  0 0 255

 OUTLINECOLOR  0 0 255

 SIZE 3

 END

END

   How would I accomplish this given existing functionality?

Thanks,
Matt
.
Matthew Cechini
Contractor, Science Systems and Applications, Inc.
NASA GIBS Systems/Software Engineer
410.205.6272
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users