Morning Robert; I am just going to be the first to reply to you - others 
are going to need to fill in the details (hint change the subject line 
as we explore different topics).
> Hello,
>
> In my quest to execute XQuery with GIS data, I found a problem with 
> WKTReader / WKTWriter.
>   
Aside: We have had some luck using JXPath behind an implementation of 
PropertyAccessor - as used by the Filter / Expression code. If I 
remember correctly XPath support is part of XQuery?
> In the first version of my application, I let the user to write a WKT 
> Polygon to create a criteria for the request (for example : return all 
> polygon which contains the POINT (278415 187644) ). I used this point to 
> create my XQuery. So I used the class WKTReader to create a Geometry 
> object, which I serialize again with org.geotools.xml.Encoder :
>
> The point serialized in GML is :
> <gml:Point xmlns:gml="http://www.opengis.net/gml";   
> xmlns:xlink="http://www.w3.org/1999/xlink";>
>     <gml:coord><gml:X>278415.0</gml:X><gml:Y>187644.0</gml:Y></gml:coord>
> </gml:Point>
>
> As you see, the srsName is not present. If I execute the request, 
> nothing is returned. If I add the attribute srsName="osgb:BNG" for 
> gml:Point, I get my objects.
>   
I am not sure what authority "osgb" is? The "referencing stuff" depends 
on implementations of AuthorityFactory:
- http://docs.codehaus.org/display/GEOTDOC/07+Referencing
- http://docs.codehaus.org/display/GEOTDOC/Referencing+Developers+Guide

I don't recommend making up a new authority - simply because they are 
used to communicate what the information means between applications; so 
you would at least need to teach several applications about your authority.
> Is it a bug ? Perhaps, I misunderstood something?
>   
Perhaps - usually the referencing stuff is provided by some industry 
standards body; I am used to them being in the format "AUTHORITYID:CODE" 
... where code is usually a number.
In GML the srs information can occur in a geometry or in a parent (like 
parent feature or parent feature collection); as such I bet we need to 
specify this as an extra parameter to the transform code?
- http://docs.codehaus.org/display/GEOTDOC/Referencing+Developers+Guide

Yes I have stuffed the information into geometry.getUserObject() as a 
String; and sometimes the code into the geometry.getSRID() but this is 
convention only; really you need to know the context of your geometry in 
order to understand it.
> I tried to put the SRS ID in the Geometry without success :
> geo.setSRID(4326);
>
> The SR ID is not the second part of the srsName (authority:ID) ?
> How can I store the srsName in my GML ?
>   
transform.setSrsName( String ) - as shown on the above page...
> When I get the result, I need to parse the GML fragment. I did it but 
> the osgb:BNG authority is not found. In google, I found this issue :
> http://jira.codehaus.org/browse/GEOT-1307
>   
Cool - well you can make a new AuthorityFactory; why not start up a new 
unsupported module for this work?
> How can I declare an authority ?
> But I get
> org.opengis.referencing.FactoryException: Les extensions de Geotools 
> sont requises pour l'opération "getIdentifiedObjectFinder".
> which means The Geotools extensions are required for the operation 
> "getIdentifiedObjectFinder".
>   
.. right - it wants to have a factory that encodes all the information 
defined by the Ordance Survey into java code (or database form).
> Thanks in advance for your help.
>   
Have fun,
Jody

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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