Hi Justin,

i am always amized how quickly you guys answer...thanks.


On 15.12.2008, at 17:01, Justin Deoliveira wrote:


SELECT planet_osm_roads.name, planet_osm_roads.way, AsSVG(simplify(st_affine(planet_osm_roads.way,x,0,0,y,tx,ty),2),1) AS assvg
For a while we have been talking about adding support for on the fly queries as feature types... not sure if this falls into your use case.

Kind of. It is on-the-fly since the output of column "assvg" is computed on the fly by postgis passing parameters for calculations. How far has gone the talking?

How exactly are x,y,tx,ty generated?

They are computed like this: it is simply a affine transformation (scale and translate) from the lat/lon coords to output screen coords:

double x = screen.getWidth() / mapExtent.getWidth();
double y = screen.getHeight() / mapExtent.getHeight();
                
double tx = -mapExtent.getMinX() * scaleX;
double ty = (mapExtent.getMinY() * scaleY) + paintArea.getHeight();

The view will also have some WHERE (either hard coded or as CQL) clause for filtering by type of the features. I want to set up a view(layer) for every zoom level so that only the features for that zoom level get returned by the database. Or is that a bad approach?

I mean, all the filtering and calculations could be done in my SVG Renderer in Geoserver but I think it would be much faster within the database.

cheers
ivo




------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to