Hi again, I just want here to put things a little bit clearer (I am a beginner, I hope it won't be too confused).
I have: - a GeoServer layer L1 which data come from a PostGIS table T1 containing geometries of type "POINT" (points), - a GeoServer layer L2 which data come from a PostGIS table T2 containing geometries of type "MULTIPOLYGON" (French departments), - a GeoServer group of layers G containing these two layers L1 and L2. As a result, I want to display a map "containing" those two layers (using OpenLayers). I need to compute a bounding box FROM these data ((T1 and T2) or (L1 and L2) or (G)). I need to do this programmatically. The bounding box I'll get as a result has to fit exactly the displayed data, in my case a map of France with "points" on it. The bounding boxes computed by Geoserver in my case are (for both T1 and T2): +--------+-----------+-----------+-----------+ | Min X | Min Y | Max X | Max Y | +--------+-----------+-----------+-----------+ | 99,226 | 6,049,647 | 1,242,375 | 7,110,524 | +--------+-----------+-----------+-----------+ => I don't understand what these huge numbers are (what is their unit of measure, etc.)... => I don't understand why the bounding boxes are the same for T1 and T2 (they shouldn't be)... => I don't know how "Min X", "Min Y", "Max X" and "Max Y" are calculated... As you can see I'm a bit lost. Can you help me? Thank you and Best regards, -- Lmhelp On 05/06/2011 10:40 AM, Lmhelp wrote: > Hi, > > Thank you for reading my post. > > Through GeoServer Web client (http://localhost:8080/geoserver/web/), if > I choose: > "Layers" -> "Add a new resource" -> "Layer chooser" -> "Publish a new > layer" > I can then: > - click the link "Compute from data" to get "Native Bounding Box" > - and also click the link "Compute from native bounds" to get "Lat/Lon > Bounding Box". > > My question is the following: > using the GeoServer REST API through a Java program, how can I: > - "compute native bounding box from data" > - and "compute lat/lon bounding box from native bounds"? > If I can't do it through GeoServer REST API can you advise me how to > compute those bounding boxes? > > Thank you and best regards, > -- > Lmhelp ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
