Hi all,
I’m planning to develop a centralized service to calculate BBox.
Currently I’m using a small set of GeoTools utils on the client side in combination with the getCapabilities to reproject the bounding box of each layer to the new desired projection.
For our purpose this in no more acceptable and we need a centralized service which will be connected to the user defined projection added to the geoserver datadir.
The service will be used to:
- return a set of BoundingBox for a given layer
F.e.:
http://SERVER/?request=getBBox&layers=layer1,…,layerN&srs=srs1,…,srsM&outputFormat=application/json
Should return something like:
{
layer1:[
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:OGC:1.3:CRS84” } } ,
“bbox”: [-180.0, -90.0, 180.0, 90.0]List
},
…
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:EPSG:4326” } } ,
“bbox”: [-180.0, -90.0, 180.0, 90.0]
},
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:EPSG:54030” } } ,
“bbox”: [-16000000, -8000000, 16000000, 8000000]
}
],
…
layerN:[
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:OGC:1.3:CRS84” } } ,
“bbox”: [-100.0, -90.0, 100.0, 90.0]
},
…
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:EPSG:4326” } } ,
“bbox”: [-100.0, -90.0, 100.0, 90.0]
},
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:EPSG:54030” } } ,
“bbox”: [-14000000, -8000000, 14000000, 8000000]
}
]
}
- return a set of BoundingBox for a given BoundingBox
F.e.:
http://SERVER/?request=getBBox&bbox=-180,-90,180,90&srs=srs1,…,srsM&outputFormat=application/json
Should return something like:
{
bboxes:
[
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:OGC:1.3:CRS84” } } ,
“bbox”: [-180.0, -90.0, 180.0, 90.0]
},
…
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:EPSG:4326” } } ,
“bbox”: [-180.0, -90.0, 180.0, 90.0]
},
{
“crs”: { “type”: “name”, “properties”: { “name”: “urn:ogc:def:crs:EPSG:54030” } } ,
“bbox”: [-16000000, -8000000, 16000000, 8000000]
}
]
}
If an SRS is not resolved an exception is returned.
The question is:
What do you think about this service? are there any valid alternatives?
Do you think that this can be useful to the geoserver community?
If so, in which way this should be developed (external module, integration with wms or wfs, etc)?
I need this service ASAP so I’ll start its implementation within this week any feedback is really appreciated.
Cheers,
Carlo Cancellieri