making efficient map layers
Stephen Woodbridge
woodbri at SWOODBRIDGE.COM
Tue Mar 22 08:13:06 PST 2005
Jeff,
Putting all the data into huge single shapefiles is a BAD idea. The
whole idea behind tileindexs is to make things faster when you do not
need all the data, ie zoomed in.
I have all the tiger data for the whole US 3300+ counties and about 10
layers per county and it is very fast. For an example, browse around:
http://imaptools.com/tiger/
So my data is in roughly 33,000 shapfiles. Have lots of shape files is
good. In fact, for some commercial data sets where the data is delivered
in a huge single shapefile, I actually break it into a lots of smaller
shapefiles and tile the data. There is an OpenSource utility for
download at http://imaptools.com/?tab=4 (ie: shp2tile)
There are a lot of details about making everything fast, but I think the
are two big keys related to street data are: One, separate out the CFCC
= /^A[456]/ into a separate file/layer that only gets displayed when you
are zoomed in. Two, for when you are zoomed out you need a generalized
road network and it might be better to use something from the National
Map of other non-tiger source. The problem with tiger is that it is a
millions of little tiny segments most of which are less than a pixel
when you are zoomed out. A generalized layer is an approximation of that
with a whole lot less points.
-Steve W.
http://imaptools.com/
Jeff Portwine wrote:
> Thanks for the information...
> I can write a script I'm sure, but I have never used the ogr2ogr utility
> and
> I'm not sure how it works... is there documentation for that? Or if
> Mapscript could be used that might be even
> better, though I really don't know how I could create new shapefiles from
> old ones but I'll look into it.
>
> Is it possible using ogr2ogr to output (as in your example) CFCC=A13 from
> every county shapefile into a single shapefile, or would I have to create
> separate output shapefiles for every county and then tile them?
>
> -Jeff
>
>
>> ogr2ogr out.shp in.shp -where CFCC=A13
>>
>> You will presumably need to wrap this in appropriate scripts to
>> invoke it on each of your files in sequence. You could also:
>> o Write a python script using OGR to do something similar.
>> o Use MapScript and use it's built in shapefile support, possibly
>> o Use ArcGIS or ArcView (with appropriate scripts)
>> o Use FME and do it with the visual modelling environment.
>> o Load the data into PostGIS and use SQL to break things up.
>>
>> ... well, you get my point. There are plenty of ways.
>>
>> If you aren't handy with scripting this might be an onerous task.
>> I would suggest you *get handy* with scripting, or look into hiring
>> someone to help out on the data processing task.
>>
>> 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