Martin Desruisseaux ha scritto:
> Andrea Aime a écrit :
>> as you may know, 4327 is 4326 evil brother, in that is
>> has the ellipsoidal height as a third axis.
>>
>> Now, let's say somewhere in the code I want to flatten
>> data and their CRS. Removing the z from the data is the
>> easy part, how do I shave off the 3rd dimension
>> from the crs and get a 2d representatio of it?
>> What I'm looking for is an api like:
>>
>> CoordinateReferenceSystem 2d = CRS.flatten(3d);
>>
>> Is there anything like that?
> 
> We have:
> 
>   CRS.getHorizontalCRS(3d);
> 
> which tries to extract the horizontal part - this is not necessarly the 
> 2 first dimensions, it could be anywhere in a n-D CRS. It should work 
> for every kind of vertical height except ellipsoidal... In other words 
> it will work for many EPSG code but not 4327.
> 
> Conceptually we should make it work for 3D ellipsoids as well - I just 
> didn't had the time to extend this method to this case yet.

Hum, I guess this is the last nail in Jody's 3D work coffin.
Let me elaborate. Jody tried to make GeoServer generate 3D GML when
data stored in a postgis database had 3 dimensions.

Doing that is not as easy as it seems, it requires the adaptation
of a lots of code. One element is CRS handling, we have lots of
places where 3d data is reprojected, either to 4326 (think computing
the lat/lon bbox for ogc services) or another srs (think wms or wfs 
reprojection).

If the data is in a 3D crs all of those will fail miserabily, meaning
that it's not even possible to setup a 3d feature type in GeoServer
(the lat/lon bbox computation will fail).

But that's not all, even when the new FORCE_2D hint is applied, to
allow flattened data to be reprojected we need to associate the
data to a 2D srs (hence my question).

Martin, how hard would it be to make that method work with ellipsoidal
height? Does it require true inspiration (aka, your knowledge) or is 
that just mere transpiration (i.e., lots of work?)?

Cheers
Andrea


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to