After the patch I could not make it through initial GetMap testing, streaming 
renderer now ends up with sa.xform as a ConcatenatedTransform  

CONCAT_MT[PARAM_MT["Molodenski",   
    PARAMETER["dim", 3],  
    PARAMETER["dx", 0.0],  
    PARAMETER["dy", 0.0],  
    PARAMETER["dz", 0.0],  
    PARAMETER["src_semi_major", 6378137.0],  
    PARAMETER["src_semi_minor", 6356752.314140356],  
    PARAMETER["tgt_semi_major", 6378137.0],  
    PARAMETER["tgt_semi_minor", 6356752.314245179]],  
  PARAM_MT["Affine",  
    PARAMETER["num_row", 3],  
    PARAMETER["num_col", 4],  
    PARAMETER["elt_0_0", 22150.89861394342],  
    PARAMETER["elt_0_3", -2899017.14839822],  
    PARAMETER["elt_1_1", -22110.882458699638],  
    PARAMETER["elt_1_3", -363366.23095146293],  
    PARAMETER["elt_2_2", 0.0],  
    PARAMETER["elt_2_3", 1.0]]]

Which StreamingRenderer cannot inverse (for use with projectionHandler). Going 
to try a similar fix to before, avoid trying for an inverse when faced with a 
ConcatenatedTransform of different dimensions.

Yep that worked, heading back to GetFeatureInfo …

a) The MathTransform is created successfully  
b) JTS.transform( geometry, MathTransform ) trips up over the change in number 
of dimensions

                MathTransform transform = CRS.findMathTransform(requestedCRS, 
dataCRS, true);
                pixelRect = (Polygon) JTS.transform(pixelRect, transform); // 
reprojected


Caused by: java.lang.IllegalArgumentException: dimension must be <= 3
at 
com.vividsolutions.jts.geom.impl.CoordinateArraySequenceFactory.create(CoordinateArraySequenceFactory.java:90)
at 
org.geotools.geometry.jts.DefaultCoordinateSequenceTransformer.transform(DefaultCoordinateSequenceTransformer.java:93)


Going to try and path that up next … rather than spam the list here let me 
create a Jira issue: https://jira.codehaus.org/browse/GEOT-4359


--  
Jody Garnett


On Wednesday, 26 December 2012 at 11:33 PM, Jody Garnett wrote:

> Andrea you are a champion! I will be more than happy to check this over when 
> I get to a computer (in a couple days!)  
>  
> I was happy assuming 0 for the WGS84 to WGS84_3D transform (i.e. assume sea 
> level).
>  
> For the specific case of a BBox transform of WGS84 to WGS84_3D I was tempted 
> to consider a min/max range of elevation (as the goal is to produce a 
> bounds).  
>  
> --  
> Jody Garnett
>  
>  
> On Monday, 24 December 2012 at 3:26 AM, Andrea Aime wrote:
>  
> > Hi,
> > I see that Jody is busy adding ad hoc code in GeoTools and GeoServer to 
> > handle
> > a case of transforming from 2d to 3d coordinates.
> >  
> > While not 100% correct, the transformation is unfortunately require as we 
> > try to   
> > handle rendering 3d data over a 2d surface, since that often/always requires
> > also building the reverse transformation (2d -> 3d), either to compute the 
> > size
> > of a pixel in source coordinates (for generalization), or pinpoint where a  
> > clicked pixel lives in source coordinates (to query the clicked feature).
> >  
> > Instead of sprinkling around ad-hoc changes I'd say it's better to allow a 
> > 2d to 3d
> > transformation, making the elevation be 0 in the target result.
> >  
> > The attached patch goes into that direction, Jody, could you give it a shot 
> > and see
> > if that works?
> >  
> > The patch for the moment uses the "lenient datum shift" flag to be 
> > activated,  
> > basically, if we say that transforming datums even if we have no bursa wolf
> > params around is ok, then it's also ok to go from 2d to  3d without throwing
> > an exception (which is of course illogical in general)
> >  
> > In fact the flag would have to be renamed to just "lenient transform"...
> >  
> > Alternatively, we could just decide that there is no need to throw 
> > exceptions when
> > hopping from 2d to 3d, in the end of the day, 2d is like having the 
> > coordinates
> > on the flat plane, so at 0 elevation.
> > On the other side, null is not 0, and on 2d, we really don't know what the 
> > elevation
> > is.
> >  
> > Suggestions, opinions?
> >  
> > Cheers
> > Andrea
> >  
> > --  
> > ==
> > Our support, Your Success! Visit http://opensdi.geo-solutions.it for more 
> > information.
> > ==
> >  
> > Ing. Andrea Aime  
> > @geowolf
> > Technical Lead
> >  
> > GeoSolutions S.A.S.
> > Via Poggio alle Viti 1187
> > 55054  Massarosa (LU)
> > Italy
> > phone: +39 0584 962313
> > fax: +39 0584 1660272
> > mob: +39  339 8844549
> >  
> > http://www.geo-solutions.it
> > http://twitter.com/geosolutions_it
> >  
> > -------------------------------------------------------  
> >  
> >  
> > Attachments:  
> > - 3dTo2d.patch
> >  
> >  
>  
>  

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to