[postgis-users] Another Question on PostGIS Performance

Jan Hartmann jhart at frw.uva.nl
Thu Oct 3 09:44:39 PDT 2002


ArcView 3.2 has the utility CleanShape. It is not in the default menus; 
you have to load it into a script window from

Help/Sample Scripts and Extensions/Sample Scripts/General/Cleans and Exports

Compile this script, put it under a button in the view window, and run 
it on your shapefile. This should remove self-intersecting polygons and 
incorrect (ie counterclockwise) inner polygons.

If this doesn't help, try simplifying your vertices with the script in

Help/Sample Sripts and Extensions/Sample Scripts/Data Conversion/Remove 
unneeded vertices

If you have ArcInfo you could use more sophisticated programs; these two 
scripts are pretty basic

Probably your data could benefit from some cleaning by hand too. If you 
get improved response from MapServer, let us know what caused the slowness.


Jan Hartmann



Thomas Haechler wrote:
> Jan,
> 
> I now prepared 3 layers in my mapfile for testing. Switching them on and
> off seperately I found:
> 
> - DATA [shapefile] :
> 	8 secs to render
> - DATA the_geom from veg:
> 	13 secs to render
> - DAta the_geom from ( select map.the_geom, data.pg,
>        map.gid from veg as map, veg_atr as data where map.pg
>        = data.pg) as foo using unique gid :
> 	15 secs to render
> 
> The shapefile takes rather long, too. I guess I didn't realize this
> before because I had always switched the rosa applet on, which takes
> longer to draw. So maybe if you give me some tips on how to clean up the
> data, this might be the solution.
> Thank you,
> Thomas
> 
> 
> 
> Jan Hartmann wrote:
> 
>>Thomas,
>>
>>It has nothing to do with indexes or joins. On rereading the mail you
>>sent me personally I saw that even a simple DATA statement
>>
>>DATA "the_geom from veg"
>>
>>took more than 10 seconds. This certainly is far too slow for the number
>>of lines you mentioned and could be a problem of the underlying map
>>(digitizing errors?). To test this, you could try to use the original
>>shapefile with MapServer. If this takes about as much time, you probably
>>  have to clean up your data. If not, perhaps the people from
>>Refractions would be interested in comparing this shapefile with the
>>much slower PostGIS version.
>>
>>Regards,
>>
>>Jan Hartmann
>>Department of Geography
>>University of Amsterdam
>>jhart at frw.uva.nl
>>
> 
> 






More information about the postgis-users mailing list