[postgis-users] Display & Print Methods For PostGIS
adam at spatialsystems.org
adam at spatialsystems.org
Sat May 23 10:16:17 PDT 2009
I have about 3,000,000 data points in a PostGIS DB that have speed
measurements associated. The measurements were taken every second and I
bin the measurements by snapping to a several hundred meter grid to
limit the number of data points.
My question is: What method would I use to create a PDF map from
PostGIS? I'll likely get the roads out of PostGIS from a stored
shapefile.
How I bin....
SELECT
X(binned_speed_data.grid) AS x,
Y(binned_speed_data.grid) AS y,
max(binned_speed_data.speed::double precision ) as max_speed,
avg(binned_speed_data.speed::double precision ) AS avg_speed,
min(binned_speed_data.speed::double precision ) AS min_speed,
count(binned_speed_data.speed) AS speed_count
FROM
(
SELECT
SnapToGrid(speed_data.location, 0.001) AS grid,
speed_data.speed as speed
FROM
speed_data
WHERE
speed_data.id = 3
) AS binned_speed_data
GROUP BY
x,
y
More information about the postgis-users
mailing list