<div dir="ltr">Expressions are easy to mess up. To test if "value" is getting thru the drive try using it as a label. That might help you to narrow down the problem.<div><br></div><div>LABELITEM "value"</div><div>. . .</div><div>CLASS</div><div> . . . </div><div> LABEL</div><div><div> . . .</div><div> END<br></div></div><div>END</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 25, 2017 at 2:08 AM, Tuffa <span dir="ltr"><<a href="mailto:chris@wherryengineering.co.uk" target="_blank">chris@wherryengineering.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Richard!<br>
<span class=""><br>
> I haven't used geojson as a data source, but maybe if you shared a small<br>
> example of your map file and the data it would help.<br>
<br>
</span>Here's some more information....<br>
<br>
mapfile.map (excerpt):<br>
<br>
LAYER<br>
NAME "countries"<br>
STATUS OFF<br>
TYPE POLYGON<br>
CONNECTIONTYPE OGR<br>
CONNECTION "africa.geojson"<br>
DATA "select * from africa"<br>
CLASS STYLE OUTLINECOLOR "#ff0000" END END<br>
CLASS EXPRESSION ([value] >= 0 AND [value] <= 1000000) STYLE COLOR<br>
"#FFE397" END END<br>
END<br>
<br>
I have tried numerous types of select statement in the DATA definition, but<br>
have failed to influence the styling based on the ‘value’ property added to<br>
the geojson file. Of course, this may have all been in vain, if the GDAL<br>
driver does not support anything other than ‘select * from <layer>’, but I<br>
cannot tell from the documentation - MapServer, or GDAL - what is allowed.<br>
<br>
Here is an excerpt of the africa.geojson file, with the additional property<br>
‘value’ added. Following is the output from ogrinfo.<br>
<br>
{<br>
"features": [<br>
{<br>
"geometry": {<br>
"coordinates": [<br>
[<br>
[<br>
[<br>
8.621624,<br>
36.941797<br>
],<br>
[<br>
8.621624,<br>
36.941797<br>
]<br>
]<br>
]<br>
],<br>
"type": "MultiPolygon"<br>
},<br>
"properties": {<br>
"cartodb_id": 1,<br>
"created_at": "2013-11-12T16:15:59+0100",<br>
"name": "Algeria",<br>
"updated_at": "2013-11-12T16:15:59+0100",<br>
"value": 10000 <<<<<<<<<<<<<<<<<<<<<<<<<<<< custom<br>
property<br>
},<br>
"type": "Feature"<br>
}<br>
],<br>
"type": "FeatureCollection"<br>
}<br>
<br>
<br>
chris:tmp chris$ ogrinfo -summary -al africa.geojson<br>
INFO: Open of `africa.geojson'<br>
using driver `GeoJSON' successful.<br>
<br>
Layer name: africa<br>
Geometry: Multi Polygon<br>
Feature Count: 1<br>
Extent: (8.621624, 36.941797) - (8.621624, 36.941797)<br>
Layer SRS WKT:<br>
GEOGCS["WGS 84",<br>
DATUM["WGS_1984",<br>
SPHEROID["WGS 84",6378137,298.257223563,<br>
AUTHORITY["EPSG","7030"]],<br>
AUTHORITY["EPSG","6326"]],<br>
PRIMEM["Greenwich",0,<br>
AUTHORITY["EPSG","8901"]],<br>
UNIT["degree",0.<wbr>0174532925199433,<br>
AUTHORITY["EPSG","9122"]],<br>
AUTHORITY["EPSG","4326"]]<br>
value: Integer (0.0) <<<<<<<<<<<<<<<<<<<<<<<< here’s the additional<br>
property<br>
cartodb_id: Integer (0.0)<br>
created_at: DateTime (0.0)<br>
name: String (0.0)<br>
updated_at: DateTime (0.0)<br>
<span class="im HOEnZb"><br>
<br>
I haven't used geojson as a data source, but maybe if you shared a small<br>
example of your map file and the data it would help.<br>
<br>
<br>
<br>
<br>
</span><div class="HOEnZb"><div class="h5">--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/Mapserver-User-f4226646.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/Mapserver-User-<wbr>f4226646.html</a><br>
______________________________<wbr>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.<wbr>org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapserver-<wbr>users</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Richard W. Greenwood, PLS<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div>
</div>