[Geoserver-devel] Bug - with postgis connections

My response.

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:cdf="http://www.opengis.net/cite/data&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/wfs http://office.refractions.net:8081/geoserver/wfs/1.0.0/WFS-basic.xsd http://www.opengis.net/cite/data http://office.refractions.net:8081/geoserver/wfs/DescribeFeatureType?typeName=cdf:Other&quot;&gt;
  <gml:boundedBy>
    <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
      <gml:coordinates decimal="." cs="," ts=" ">500000,500000 500000,500100 500100,500100 500100,500000</gml:coordinates>
          </gml:Box>
      </gml:boundedBy>
  <gml:featureMember>
    <cdf:Other fid="Other.676316386">
      <cdf:gmldescription>A Single Feature used to test returning of properties</cdf:gmldescription>
      <cdf:gmlname>singleFeature</cdf:gmlname>
      <gml:boundedBy>
        <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates decimal="." cs="," ts=" ">500000,500000 500000,500100 500100,500100 500100,500000</gml:coordinates>
                  </gml:Box>
              </gml:boundedBy>
      <gml:pointProperty>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates decimal="." cs="," ts=" ">500050,500050</gml:coordinates>
                  </gml:Point>
              </gml:pointProperty>
      <cdf:string1>always</cdf:string1>
      <cdf:string2>sometimes</cdf:string2>
      <cdf:integers>7</cdf:integers>
      <cdf:dates>2002-12-02</cdf:dates>
          </cdf:Other>
      </gml:featureMember>
  </wfs:FeatureCollection>

The buged lines of this:

      <cdf:gmldescription>A Single Feature used to test returning of properties</cdf:gmldescription>
      <cdf:gmlname>singleFeature</cdf:gmlname>

This should read:

      <gml:description>A Single Feature used to test returning of properties</cdf:gmldescription>
      <gml:name>singleFeature</cdf:gmlname>

The problem has to do with extracting these from the database ...

The Other table is defined as:

              Table "public.Other"
     Column | Type | Modifiers
----------------+-------------------+-----------
gmldescription | character varying |
gmlname | character varying |
boundedBy | geometry |
pointProperty | geometry |
string1 | character varying | not null
string2 | character varying |
integers | integer |
dates | date |
Check constraints: "$1" (srid("pointProperty") = 32615)
                   "$2" ((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))
                   "$3" (srid("boundedBy") = 32615)
                   "$4" ((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL))

David

Will you put this as a bug in JIRA? Also for the cite tests you should
use schema.xml files, there's no way the FeatureTypeTransformer is in good
enough shape to handle cite. The featureTypes that you need are defined
in the misc/cite/citeTypes.tar.gz, just unzip it and it will build the
featureType structure that you need.

Chris

On Fri, 16 Jan 2004, David Zwiers wrote:

My response.

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:cdf="http://www.opengis.net/cite/data&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/wfs http://office.refractions.net:8081/geoserver/wfs/1.0.0/WFS-basic.xsd http://www.opengis.net/cite/data http://office.refractions.net:8081/geoserver/wfs/DescribeFeatureType?typeName=cdf:Other&quot;&gt;
  <gml:boundedBy>
    <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
      <gml:coordinates decimal="." cs="," ts=" ">500000,500000 500000,500100 500100,500100 500100,500000</gml:coordinates>
      
    </gml:Box>
    
  </gml:boundedBy>
  <gml:featureMember>
    <cdf:Other fid="Other.676316386">
      <cdf:gmldescription>A Single Feature used to test returning of properties</cdf:gmldescription>
      <cdf:gmlname>singleFeature</cdf:gmlname>
      <gml:boundedBy>
        <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates decimal="." cs="," ts=" ">500000,500000 500000,500100 500100,500100 500100,500000</gml:coordinates>
          
        </gml:Box>
        
      </gml:boundedBy>
      <gml:pointProperty>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates decimal="." cs="," ts=" ">500050,500050</gml:coordinates>
          
        </gml:Point>
        
      </gml:pointProperty>
      <cdf:string1>always</cdf:string1>
      <cdf:string2>sometimes</cdf:string2>
      <cdf:integers>7</cdf:integers>
      <cdf:dates>2002-12-02</cdf:dates>
      
    </cdf:Other>
    
  </gml:featureMember>
  
</wfs:FeatureCollection>

The buged lines of this:

      <cdf:gmldescription>A Single Feature used to test returning of properties</cdf:gmldescription>
      <cdf:gmlname>singleFeature</cdf:gmlname>

This should read:

      <gml:description>A Single Feature used to test returning of properties</cdf:gmldescription>
      <gml:name>singleFeature</cdf:gmlname>

The problem has to do with extracting these from the database ...

The Other table is defined as:

              Table "public.Other"
     Column | Type | Modifiers
----------------+-------------------+-----------
gmldescription | character varying |
gmlname | character varying |
boundedBy | geometry |
pointProperty | geometry |
string1 | character varying | not null
string2 | character varying |
integers | integer |
dates | date |
Check constraints: "$1" (srid("pointProperty") = 32615)
                   "$2" ((geometrytype("pointProperty") = 'POINT'::text)
OR ("pointProperty" IS NULL))
                   "$3" (srid("boundedBy") = 32615)
                   "$4" ((geometrytype("boundedBy") = 'POLYGON'::text)
OR ("boundedBy" IS NULL))

David

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--

Can you tell me how FeatureTypeTransformer must be changed/improved so that it is "in good enough shape" for cite. What is missing? I might look into this and improve FeatureTypeTransformer. Or is it just the problem that FeatureType and AttributeType do not provide enough information?

Simon

Am 16.01.2004 um 21:24 schrieb Chris Holmes:

Will you put this as a bug in JIRA? Also for the cite tests you should
use schema.xml files, there's no way the FeatureTypeTransformer is in good
enough shape to handle cite. The featureTypes that you need are defined
in the misc/cite/citeTypes.tar.gz, just unzip it and it will build the
featureType structure that you need.

Chris

On Fri, 16 Jan 2004, David Zwiers wrote:

My response.

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:cdf="http://www.opengis.net/cite/data&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/wfs http://office.refractions.net:8081/geoserver/wfs/1.0.0/WFS-basic.xsd http://www.opengis.net/cite/data http://office.refractions.net:8081/geoserver/wfs/DescribeFeatureType?typeName=cdf:Other&quot;&gt;
  <gml:boundedBy>
    <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
      <gml:coordinates decimal="." cs="," ts=" ">500000,500000 500000,500100 500100,500100 500100,500000</gml:coordinates>

    </gml:Box>

  </gml:boundedBy>
  <gml:featureMember>
    <cdf:Other fid="Other.676316386">
      <cdf:gmldescription>A Single Feature used to test returning of properties</cdf:gmldescription>
      <cdf:gmlname>singleFeature</cdf:gmlname>
      <gml:boundedBy>
        <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates decimal="." cs="," ts=" ">500000,500000 500000,500100 500100,500100 500100,500000</gml:coordinates>

        </gml:Box>

      </gml:boundedBy>
      <gml:pointProperty>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
          <gml:coordinates decimal="." cs="," ts=" ">500050,500050</gml:coordinates>

        </gml:Point>

      </gml:pointProperty>
      <cdf:string1>always</cdf:string1>
      <cdf:string2>sometimes</cdf:string2>
      <cdf:integers>7</cdf:integers>
      <cdf:dates>2002-12-02</cdf:dates>

    </cdf:Other>

  </gml:featureMember>

</wfs:FeatureCollection>

The buged lines of this:

      <cdf:gmldescription>A Single Feature used to test returning of properties</cdf:gmldescription>
      <cdf:gmlname>singleFeature</cdf:gmlname>

This should read:

      <gml:description>A Single Feature used to test returning of properties</cdf:gmldescription>
      <gml:name>singleFeature</cdf:gmlname>

The problem has to do with extracting these from the database ...

The Other table is defined as:

              Table "public.Other"
     Column | Type | Modifiers
----------------+-------------------+-----------
gmldescription | character varying |
gmlname | character varying |
boundedBy | geometry |
pointProperty | geometry |
string1 | character varying | not null
string2 | character varying |
integers | integer |
dates | date |
Check constraints: "$1" (srid("pointProperty") = 32615)
                   "$2" ((geometrytype("pointProperty") = 'POINT'::text)
OR ("pointProperty" IS NULL))
                   "$3" (srid("boundedBy") = 32615)
                   "$4" ((geometrytype("boundedBy") = 'POLYGON'::text)
OR ("boundedBy" IS NULL))

David

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

It's more that they don't provide enough information. I'll try out the
cite tests using the featureType transformer. But cite tests were very
annoying to get exactly right... Do you have a jira account? I can
assign the bug for you after I figure out what needs to be fixed.

Actually the specific problem here is that the FeatureTypeTransformer
needs a gmlPrefixing option, see FeatureTranformer, it just prefixes gml:
on to name, description and boundedBy. I put in a bit of a hack so that
if gmlPrefixing is set to true AND it sees a name, description or
boundedBy it uses gml instead of the default prefix. It seems to really
only be cite that cares about things like this. It has to do with the
AbstractFeature in gml, that all inherit those three properties, but they
are optional, so it's a question of how to represent them in the database,
if they appear should they be prefixed? It's currently hacky because it
just sees if any match, ideally it would see if the first attribute was
name, if the second after name (or the first) was description and if the
third (or second after name or description, or first), was boundedBy, then
it would be prefixed.

David - you should rename your tables to just name and description, and
then turn the gmlPrefixing option in WFS service to true. This should do
the right prefixing for you.

Chris

On Fri, 16 Jan 2004, Simon Raess wrote:

Can you tell me how FeatureTypeTransformer must be changed/improved so
that it is "in good enough shape" for cite. What is missing? I might
look into this and improve FeatureTypeTransformer. Or is it just the
problem that FeatureType and AttributeType do not provide enough
information?

Simon

Am 16.01.2004 um 21:24 schrieb Chris Holmes:

> Will you put this as a bug in JIRA? Also for the cite tests you should
> use schema.xml files, there's no way the FeatureTypeTransformer is in
> good
> enough shape to handle cite. The featureTypes that you need are
> defined
> in the misc/cite/citeTypes.tar.gz, just unzip it and it will build the
> featureType structure that you need.
>
> Chris
>
> On Fri, 16 Jan 2004, David Zwiers wrote:
>
>> My response.
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs&quot;
>> xmlns:gml="http://www.opengis.net/gml&quot;
>> xmlns:cdf="http://www.opengis.net/cite/data&quot;
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
>> xsi:schemaLocation="http://www.opengis.net/wfs
>> http://office.refractions.net:8081/geoserver/wfs/1.0.0/WFS-basic.xsd
>> http://www.opengis.net/cite/data
>> http://office.refractions.net:8081/geoserver/wfs/DescribeFeatureType?
>> typeName=cdf:Other">
>> <gml:boundedBy>
>> <gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
>> <gml:coordinates decimal="." cs="," ts=" ">500000,500000
>> 500000,500100 500100,500100 500100,500000</gml:coordinates>
>>
>> </gml:Box>
>>
>> </gml:boundedBy>
>> <gml:featureMember>
>> <cdf:Other fid="Other.676316386">
>> <cdf:gmldescription>A Single Feature used to test returning of
>> properties</cdf:gmldescription>
>> <cdf:gmlname>singleFeature</cdf:gmlname>
>> <gml:boundedBy>
>> <gml:Box
>> srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
>> <gml:coordinates decimal="." cs="," ts=" ">500000,500000
>> 500000,500100 500100,500100 500100,500000</gml:coordinates>
>>
>> </gml:Box>
>>
>> </gml:boundedBy>
>> <gml:pointProperty>
>> <gml:Point
>> srsName="http://www.opengis.net/gml/srs/epsg.xml#32118&quot;&gt;
>> <gml:coordinates decimal="." cs="," ts="
>> ">500050,500050</gml:coordinates>
>>
>> </gml:Point>
>>
>> </gml:pointProperty>
>> <cdf:string1>always</cdf:string1>
>> <cdf:string2>sometimes</cdf:string2>
>> <cdf:integers>7</cdf:integers>
>> <cdf:dates>2002-12-02</cdf:dates>
>>
>> </cdf:Other>
>>
>> </gml:featureMember>
>>
>> </wfs:FeatureCollection>
>>
>> The buged lines of this:
>>
>> <cdf:gmldescription>A Single Feature used to test returning of
>> properties</cdf:gmldescription>
>> <cdf:gmlname>singleFeature</cdf:gmlname>
>>
>>
>>
>> This should read:
>>
>> <gml:description>A Single Feature used to test returning of
>> properties</cdf:gmldescription>
>> <gml:name>singleFeature</cdf:gmlname>
>>
>> The problem has to do with extracting these from the database ...
>>
>> The Other table is defined as:
>>
>> Table "public.Other"
>> Column | Type | Modifiers
>> ----------------+-------------------+-----------
>> gmldescription | character varying |
>> gmlname | character varying |
>> boundedBy | geometry |
>> pointProperty | geometry |
>> string1 | character varying | not null
>> string2 | character varying |
>> integers | integer |
>> dates | date |
>> Check constraints: "$1" (srid("pointProperty") = 32615)
>> "$2" ((geometrytype("pointProperty") =
>> 'POINT'::text)
>> OR ("pointProperty" IS NULL))
>> "$3" (srid("boundedBy") = 32615)
>> "$4" ((geometrytype("boundedBy") = 'POLYGON'::text)
>> OR ("boundedBy" IS NULL))
>>
>>
>> David
>>
>>
>>
>> -------------------------------------------------------
>> The SF.Net email is sponsored by EclipseCon 2004
>> Premiere Conference on Open Tools Development and Integration
>> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
>> http://www.eclipsecon.org/osdn
>> _______________________________________________
>> Geoserver-devel mailing list
>> Geoserver-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>>
>
> --
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>

--

Simon Raess wrote:

Can you tell me how FeatureTypeTransformer must be changed/improved so that it is "in good enough shape" for cite. What is missing? I might look into this and improve FeatureTypeTransformer. Or is it just the problem that FeatureType and AttributeType do not provide enough information?

The geotools2 FeatureTypeMetaData interface provides a place for more information for an all GeoTools2 solution.

On the GeoServer side we are making use of FeatureTypeInfoDTO (which makes a FeatureTypeInfo which implements FeatureTypeMetaData).

I have attached a class we used to map from propertyName/Java class to the gml or xs namespace.

The difficulty is that the XMLSChema that uses gml:*PropertyTypes do not have a name associated with them for easy alignment with geoTools2 AttributeTypes.

So the attached class provides a list of all the mappings for xs/gml namespaces, I have also included a Factory method that shows how to make use of this service.
The GeoServer writer that is used for saving and DescribeType opperation makes use of these MetaDataClasses to generate the correct XMLSchema fragment.

Sorry for not involving you earlier :frowning: I hope that the attached classes can be worked into GeoTools2 now that the FeatureTypeMetaData class exists.
(We may need to reverse the link between FeatureType and FeatureTypeMetaData before this can happen smoothly).

Cheers,
Jody

(attachments)

GMLUtils.java (15.1 KB)
DataTransferObjectFactory.java (3.77 KB)
FeatureTypeInfoDTO.java (12.8 KB)