[mapserver-users] draw line using mysql sahpe file
Paolo Corti
pcorti at gmail.com
Wed Mar 7 02:36:14 PST 2012
> But I desire only one of them using eq_id column but when I make sql
> statement as follows. I mean when I add sql statement it draws nothing.
> But be sure same eq_id comes to map file correctly to draw point of
> epicenter. There is no problem for it. Also I use EXPRESSION FOR CLASS
> also it doesn't draw line on the map. Previous map draws all, following
> draws nothing. How can I pass this handicap. Please let help me.
> LAYER
> NAME "fault"
> TYPE line
> STATUS default
> CONNECTIONTYPE OGR
> CONNECTION '<OGRVRTDataSource>
> <OGRVRTLayer name="sfault">
> <SrcDataSource>MYSQL:testogr,user=root,password=password123,host=localhost,port=3306,tables=sfault</SrcDataSource>
> <SrcSQL>SELECT eq_id from sfault where eq_id like "%eq_id%" </SrcSQL>
> </OGRVRTLayer>
> </OGRVRTDataSource>'
>
In your SrcSQL you need to include the geometry field.
You have to include the GeometryField subelement as well.
Always try to use ogrinfo to check if the dataset is returning
expected results (specially for geometry)
best regards
P
--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti
More information about the MapServer-users
mailing list