Martin Desruisseaux ha scritto:
> Andrea Aime a écrit :
>> I'm wondering if there's any way to get a validity area for a generic 
>> transform,
>> that is, a bbox in source coordinates telling me where the transform 
>> works, and
>> were it starts failing.

> Then the "area of validity" should be defined as part of the 
> CoordinateOperation metadata. This area of validity can be defined in 
> various way, including string, geographic bounding box, envelope or 
> arbitrary polygon (all this flexibility is provided by the ISO 19115 
> "Extent" object). It sound like that I didn't wrote a convenience method 
> for extracting an envelope from a CoordinateOperation - we should 
> probably open a JIRA task as a remainder that we should add such 
> convenience method.
> 
> In the main time, there is a convenience method for extracting an 
> envelope or a geographic bounding box from a CRS. So the easier way to 
> check the "area of validity" of a transform is probably to invoke:
> 
>     Envelope areaOfValidity = CRS.getEnvelope(operation.getTargetCRS());

Ok, this may work, but the sematics are tricky.
For example, see the following:

CoordinateReferenceSystem utm1N = CRS.decode("EPSG:32601");
System.out.println(CRS.getGeographicBoundingBox(utm1N));

--> 84°00'00,0"N, 180°00'00,0"W - 00°00'00,0"N, 174°00'00,0"W

That is, the actual UTM zone boudaries, which is not the extent
where the actual mathematics used by the projection start to fail.
Going beyond this would trigger errors if assertions are enabled,
yet for some applications (such as, for example, a projection explorer
app) I may like to go beyond that strict domain of definition
and show people how big are deformations once you go too far from
the central meridian.

That's why I'd like to see something defined in the MapProjection
subclasses based on simply the mathematics of the transform, and get
the bbox that won't trigger a TransformException.

This is something that could be defined at the MapTransform level,
since every transform may have a validity domain, and then return null
for those where the domain is not known or nobody cared to define it
(in this case I could gracefully degrade and simply throw away the
geometry I cannot handle).

Cheers
Andrea


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to