[postgis-users] advice for quicker display?

Bistrais, Bob Bob.Bistrais at maine.gov
Tue Feb 14 12:09:20 PST 2012


Wow!  Where are the ST_Simplify and other functions docuemented- in
PostGIS docs or MapServer docs?

 

________________________________

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
pcreso at pcreso.com
Sent: Tuesday, February 14, 2012 2:44 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] advice for quicker display?

 

Also,

In Postgis you can use the ST_Simplfy() function in mapserver zoom
(scale dependent) layers. So you have one dataset, and as you zoom out
you display features represented by progressively fewer vertices. You
don't need every headland of a global coastline dataset plotted until
you  until you zoom in. This can give vastly better performance than a
shapefile when zoomed out.

You can use pre-prepared geometries, so each record has more than one
geometry column, or you can do the point reduction on the fly (in the
SQL command in the mapfile DATA statement), whichever meets your needs.

The default Postgres configuration is for pretty basic hardware. You
might find & run pgtune, or look at the postgres admin docs to configure
it to more effectively use the available memory, and see how to use
tablespaces to manage data & indexes across filesystems to increase
overall disk throughput. 

So it takes some work, but overall, Postgis provides spatial data
management tools with substantial performance optimisation capabilities.
But you need to use them.

For plotting an entire unsimplified dataset, the overhead of a database
will always be somewhat slower than a file streaming from disk. Note
that on good hardware with an well optimised database even this
difference can be minimised.

Cheers,

   Brent Wood

--- On Wed, 2/15/12, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:


From: Stephen Woodbridge <woodbri at swoodbridge.com>
Subject: Re: [postgis-users] advice for quicker display?
To: postgis-users at postgis.refractions.net
Date: Wednesday, February 15, 2012, 8:14 AM

On 2/14/2012 1:57 PM, Bistrais, Bob wrote:
> As some of you already know, I'm a newbie to PostGIS and have just
> barely got a test PostGIS database up and running. So, my latest
> question is in regards to draw times. I created a statewide parcel
layer
> from a shapefile. At statewide scale, when the application loads, the
> parcel data draws far slower than the original shapefile did. How can
I
> tune this so that draw times are better?

If you are drawing all the data, it will always be slower than
shapefiles. The trick is to not draw more than is reasonable at a given
scale. So the answer is don't try to draw all the parcels for the whole
state. As you zoom in and need to only draw a subset of the parcels, you
will start to get speed advantages by using the spatial (GIST) indexes
in postgis.

create index mytable_the_geom_gidx on mytable using gist (the_geom);

-Steve W
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120214/8ff300fa/attachment.html>


More information about the postgis-users mailing list