Thanks for the information, I will create a bug report next week.


I was able to solve the ordering problem with another GeoTools change,
but this one is a bit of a kludge.



In org.geotools.gml3.bindindings.PointTypeBinding.parse() the order of
the coordinates is being used irrespective of any coordinate reference
system.



I switched the order to get them to work.



The code is below:



    public Object parse(ElementInstance instance, Node node, Object
value)

        throws Exception {

        if (node.hasChild(DirectPosition.class)) {

            DirectPosition dp = (DirectPosition)
node.getChildValue(DirectPosition.class);



            return gFactory.createPoint(new
Coordinate(dp.getOrdinate(1), dp.getOrdinate(0)));

        }



        if (node.hasChild(Coordinate.class)) {

            return gFactory.createPoint((Coordinate)
node.getChildValue(Coordinate.class));

        }



        if (node.hasChild(CoordinateSequence.class)) {

            return gFactory.createPoint((CoordinateSequence)
node.getChildValue(

                    CoordinateSequence.class));

        }



        return null;

    }



While I completely agree that the order should be based on the
coordinate reference system, I do not believe that is being considered
in the current state of the code.



I will create a bug report for this also.



In addition, we were able to identify cases in GeoServer where the a
parent feature's coordinates where ordered in one way and a child's
feature coordinates were transposed in a single complex query.



Thanks,

Dale McIntosh



From: Jody Garnett [mailto:[email protected]]
Sent: Friday, August 20, 2010 5:45 AM
To: Dale F. McIntosh
Cc: [email protected]
Subject: [SUSPECTED SPAM] - Re: [Geotools-gt2-users] Application Schema
parsing issues - Email found in subject



In order to get someone to review your patch could you kindly create a
bug report.



With respect to lay/lon being tansposed - it is a very common problem
(mostly because each user has a different idea of what order it should
be in; please check your coordinate reference system object, look at the
axis - the order defined there should match your data). I should note
that this issue is not specific to geotools - it is a plague on our
industry called lack of metadata :)



For more information see the user guide:

- http://docs.codehaus.org/display/GEOTDOC/The+axis+order+issue



Jody



On 19/08/2010, at 5:20 PM, Dale F. McIntosh wrote:



        I have an application that queries a GeoServer (2.0.1) that
contains complex features using GeoTools 2.7 M2.



        I have successfully integrated the simple features into the
application leveraging a wfsDataStoreFactory



        I have begun processing the Complex Features and have run into a
couple of issues.



        We encountered a bug in Application Schema parsing code - I have
attached a potential fix.



        Essentially, org.geotools.gml3.ApplicationSchemaXSD threw a
NullPointerException when attempting to process relative includes when
parsing the schema.



        This fix has eliminated the problem and I am now faced with
another issue with the latitudes and longitudes being transposed.



        When I user the method below to get the Point geometry, the X
and Y coordinated are transposed in the Point object from where they
were when I used this method with the wfsDataStoreFactory.



              public static Point getPointGeometry(Feature feature) {

                    Point point = null;

                    GeometryAttribute geometryAttribute =
feature.getDefaultGeometryProperty();

                    if (geometryAttribute != null) {

                          Object geometryValue =
geometryAttribute.getValue();

                          if (geometryValue instanceof Point) {

                                point = (Point) geometryValue;

                          }

                    }

                    return point;

              }





        I have queried for wfs version 1.0.0 and 1.1.0 and receive the
same results for both.



        Any help would be appreciated.



        I can create and post a test program in the next couple of days,
if this will help.



        Thanks,

        Dale McIntosh




<ApplicationSchemaXSD.java>---------------------------------------------
---------------------------------
        This SF.net email is sponsored by

        Make an app they can't live without
        Enter the BlackBerry Developer Challenge
        http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
        Geotools-gt2-users mailing list
        [email protected]
        https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users



------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to