GeoServer unable to compute intersection when unit of longitudes are in different format

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GeoServer unable to compute intersection when unit of longitudes are in different format

Joseph Shin
org.geoserver.wcs.DefaultWebCoverageService100.computeIntersectionEnvelop(GeneralEnvelope requestedEnvelope, GeneralEnvelope nativeEnvelope) returns correctly computed intersection for below case:

requestedEnvelope=GeneralEnveloope
--> crs=DefaultGeographicCRS
--> ordinates=[-128.075,  21.92500000000004, -108.875, 43.075]

nativeEnvelope=GeneralEnvelope
--> crs=DefaultEngineeringCRS
--> ordinates=[-128.075,  21.92500000000004, -108.875, 43.075]


However, org.geoserver.wcs.DefaultWebCoverageService100.computeIntersectionEnvelop(GeneralEnvelope requestedEnvelope, GeneralEnvelope nativeEnvelope) returns NULL for below envelopes.


requestedEnvelope=GeneralEnveloope
--> crs=DefaultGeographicCRS
--> ordinates=[231.925,  21.92500000000004, 251.925, 43.075]

nativeEnvelope=GeneralEnvelope
--> crs=DefaultEngineeringCRS
--> ordinates=[-128.075,  21.92500000000004, -108.875, 43.075]


The first envelope was created from WPS post request with below envelope information:

<ns1:Envelope srsName="EPSG:4326">

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">-128.075   21.925</gml:pos>

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">-108.875   43.075</gml:pos>

                 </ns1:Envelope>

 

The second envelope was created from WPS post request with below envelope information:

<ns1:Envelope srsName="EPSG:4326">

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">231.925   21.925</gml:pos>

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">251.925   43.075</gml:pos>

                </ns1:Envelope>

 

 

For both cases, the requestedEnvelope references the same area.  The only difference is that one is in [-180:180] format and the other is in [0:360] format for longitudes.

 

Is this known issue?  Or is the requestedEnvelope in second case incorrectly created and should be using some other CRS?


--
Joseph Shin

We are what we repeatedly do. Excellence then is not an act but a habit.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: GeoServer unable to compute intersection when unit of longitudes are in different format

Jonathan Moules-2
Hi Joseph,
I don't know much of anything about this part of GeoServer but I'd guess it's a bug, probably worth reporting to JIRA and letting the devs confirm it's not if that's the case.

Cheers,
Jonathan



On 22 August 2014 17:21, Joseph Shin <[hidden email]> wrote:
org.geoserver.wcs.DefaultWebCoverageService100.computeIntersectionEnvelop(GeneralEnvelope requestedEnvelope, GeneralEnvelope nativeEnvelope) returns correctly computed intersection for below case:

requestedEnvelope=GeneralEnveloope
--> crs=DefaultGeographicCRS
--> ordinates=[-128.075,  21.92500000000004, -108.875, 43.075]

nativeEnvelope=GeneralEnvelope
--> crs=DefaultEngineeringCRS
--> ordinates=[-128.075,  21.92500000000004, -108.875, 43.075]


However, org.geoserver.wcs.DefaultWebCoverageService100.computeIntersectionEnvelop(GeneralEnvelope requestedEnvelope, GeneralEnvelope nativeEnvelope) returns NULL for below envelopes.


requestedEnvelope=GeneralEnveloope
--> crs=DefaultGeographicCRS
--> ordinates=[231.925,  21.92500000000004, 251.925, 43.075]

nativeEnvelope=GeneralEnvelope
--> crs=DefaultEngineeringCRS
--> ordinates=[-128.075,  21.92500000000004, -108.875, 43.075]


The first envelope was created from WPS post request with below envelope information:

<ns1:Envelope srsName="EPSG:4326">

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">-128.075   21.925</gml:pos>

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">-108.875   43.075</gml:pos>

                 </ns1:Envelope>

 

The second envelope was created from WPS post request with below envelope information:

<ns1:Envelope srsName="EPSG:4326">

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">231.925   21.925</gml:pos>

                                    <gml:pos xmlns:gml="http://www.opengis.net/gml">251.925   43.075</gml:pos>

                </ns1:Envelope>

 

 

For both cases, the requestedEnvelope references the same area.  The only difference is that one is in [-180:180] format and the other is in [0:360] format for longitudes.

 

Is this known issue?  Or is the requestedEnvelope in second case incorrectly created and should be using some other CRS?


--
Joseph Shin

We are what we repeatedly do. Excellence then is not an act but a habit.

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users



This transmission is intended for the named addressee(s) only and may contain confidential, sensitive or personal information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users