making efficient map layers

Frank Warmerdam fwarmerdam at GMAIL.COM
Wed Mar 23 21:12:23 EST 2005


On Wed, 23 Mar 2005 20:53:46 -0500, Mark Dieterich <mdieterich at gmail.com> wrote:
> - Is there any speed reason to split types of roads, based on the CFCC
> type, into different shapefiles or is it just as good to use shp2tile
> and then a tileindex?

Mark,

I should let Steve answer this, but since I am answer the later
ogr2ogr question,
I will dip my oar in and say that given how MapServer works with shapefiles,
you are generally better to pre-segregate the data into files based on
what features
you want to process in a given layer.   Depending on FILTER or null styles to
discard features you don't want to render is alot more expensive than ensuring
they aren't in the data stream to start with.

> On a side not, is it possible to throw a wildcard
> at ogr2ogr, where by you can specify something likek ogr2ogr dst.shp
> src.shp -where CFCC=A1*?  I couldn't figure out if it could take
> wildcards or not.  I suppose you could go through and run it for each
> A1* type and append it to the shapefile, but this could be a long process.

The -where clause supports a subset of SQL WHERE clause syntax,
which includes the LIKE operator.   I seemed to get all A1* features
when I used the command:

 ogrinfo -ro . CompleteChain -where 'CFCC LIKE "A1%"'

The OGR SQL document talks about what is legal in a WHERE clause.

  http://www.gdal.org/ogr/ogr_sql.html

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list