On Tue, Feb 21, 2012 at 5:22 PM, David Winslow <[email protected]> wrote:

> Hi all,
>
> Not sure if this should have gone to the users list, but it seems like
> some change to GeoServer is warranted so I'll bring it up here.  I ran into
> some surprising behavior while investigating some issues with the GeoNode
> demo site (http://demo.geonode.org/ is the demo, see http://geonode.org/if 
> you're curious about the GeoNode project.)
>
> A user (hi Chris) attempted to upload some data in Shapefile format
> including a .prj file (the data was downloaded from the web here:
> http://sfpark.org/resources/disabled-parking-census-gis-data/).  When a
> user uploads data to GeoNode, the first thing GeoNode does with it is
> attempt an upload to GeoServer via the REST API.  For this dataset,
> GeoServer is able to parse the .prj, but it doesn't correspond to any known
> projection in GeoServer's EPSG:database.  In this case GeoServer *leaves
> the lat/lon bounding box null* but publishes the layer anyway - causing
> errors for the next user to try and access the WMS GetCapabilities
> response[1].  GeoNode attempts to apply some heuristics here, but they are
> not reliable and uploading in GeoNode really doesn't work well.  It would
> be nice to be able to trigger calculation of the lat/lon bounding box
> through the rest API.
>
>
I agree. This seems like an error in the REST api, though I believe we also
have a level of protection in
terms of catalog validation that should probably also trigger when adding
new layers programmatically?
Justin should be the expert in both areas.


> While investigating I took the same dataset and loaded into a GeoServer
> instance without the GeoNode extensions.  I found that GeoServer was still
> unable to find an EPSG: identifier for the projection (no surprise there)
> but when I chose to "reproject native to declared," the "lat/lon bounding
> box" field continued to contain values from the "native bounding box".
>  (Yes, I did click the "calculate" link.)  I've attached a screenshot of
> the projection and bounding box settings for the layer.  Is the lat/lon
> bounding box supposed to contain native values in this case? (And if so,
> can we change the UI to reflect that?)
>

In the case you're reporting it definitely should not, it's a bug. Patch
appreciated :-)


>
> With this configuration, I found that the WMS capabilities document
> contained a Layer like this:
>
>> <Layer queryable="1">
>>   <Name>tiger:DisabledParking_09162011</Name>
>>   <Title>DisabledParking_09162011</Title>
>>   <Abstract/>
>>   <KeywordList>
>>     <Keyword>DisabledParking_09162011</Keyword>
>>     <Keyword>features</Keyword>
>>   </KeywordList>
>>   <CRS>EPSG:4326</CRS>
>>   <CRS>CRS:84</CRS>
>>   <EX_GeographicBoundingBox>
>>     <westBoundLongitude>5979728.115160578</westBoundLongitude>
>>     <eastBoundLongitude>6017766.6348263305</eastBoundLongitude>
>>     <southBoundLatitude>2087141.1629708656</southBoundLatitude>
>>     <northBoundLatitude>2122186.380455502</northBoundLatitude>
>>   </EX_GeographicBoundingBox>
>>   <BoundingBox CRS="CRS:84" minx="5979728.115160578"
>> miny="2087141.1629708656" maxx="6017766.6348263305"
>> maxy="2122186.380455502"/>
>>   <BoundingBox CRS="EPSG:4326" minx="37.70971590938815"
>> miny="-122.51447352978471" maxx="37.80811499780386"
>> maxy="-122.38039658793801"/>
>>   <Style>
>>     <Name>point</Name>
>>     <Title>Default Point</Title>
>>     <Abstract>A sample style that draws a point</Abstract>
>>     <LegendURL width="20" height="20">
>>       <Format>image/png</Format>
>>       <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink";
>> xlink:type="simple"
>>        xlink:href="
>> http://localhost:8080/geoserver/ows?service=WMS&amp;request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=2<http://localhost:8080/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=2>
>>     </LegendURL>
>>   </Style>
>> </Layer>
>
>
> Shouldn't the GeographicBoundingBox, BoundingBox CRS="CRS:84", and
> BoundingBox CRS="EPSG:4326" all have the same values?
>
>
Theoretically yes, someone should check what's going on in the WMS 1.3 caps
generator
"Reproject from native" is, afaik, rarely used, and does not have that many
(if any) tests, it's an area
where we need to improve and add tests to cover the behavior.

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to