Pavel,

Thanks for the suggestion, but this wont help. The geometries aren't predetermined, but created on the fly by the user.

Blake

Pavel Iacovlev wrote:
I would make something among this lines like cache all elevation for
each geometry.

1. Create a table elevation_points
id - (index)
table - table name (index) (if you have multiple data tables)
parent_id - id of the linestring (index)
the_geom - point - (index)
value - elevation value

2.
Make a PHP script that populates elevation_pointst table using the
algorithm you already developed, or create a ON UPDATE trigger for the
geometry, so then the geometry is changed the elevation_points are set
accordingly to changes.

3.
Using a SQL JOIN fetch the data in a preferred way very fast.

On Wed, Aug 12, 2009 at 5:40 PM, Blake Crosby<[email protected]> wrote:
Hello! Wondering if a few of you can provide some insight here:

Problem: Given a linestring, return the elevation data along that
linestring from CDED data (ASCII DEM).

I'm using Mapserver 5.4.2

I'm using PHP Mapscript and queryByPoint to get values from my DEMs.
However, the performance seems really slow. Essentially here is how I
have things set up:

Fetch Linestring from postgis, and select N points from the string every
Y distance (ie, get the points every 1 km).

Loop through each point and do a queryByPoint() to get the value from
Mapserver.

I've tried using a tilecache, yo no avail. It still takes over 60
seconds to query approx 200 points.

I would like to use the 50k CDED dems, however the performance is even
worse. So i'm using the 250k ones, approx 4,280 files.

Any tips on improving performance?

Blake
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users




_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to