feature-id's and valid GML

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

feature-id's and valid GML

Bart van den Eijnden (OSGIS)
Hi list,

how does Geoserver map feature-id's? Can it be coupled to a database column?

I now seem to be using some kind of auto-generated fid's, but this
causes the GML to be invalid (at least according to XMLSpy):

        <rwsagi:PERCELEN fid="PERCELEN.1386000:10740af721f:-391a">

it says the value of fid does not match simple type xs:ID.

Best regards,
Bart


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: feature-id's and valid GML

Chris Holmes-2
Quoting Bart van den Eijnden <[hidden email]>:

> Hi list,
>
> how does Geoserver map feature-id's? Can it be coupled to a database
> column?
>
> I now seem to be using some kind of auto-generated fid's, but this
> causes the GML to be invalid (at least according to XMLSpy):
>
>         <rwsagi:PERCELEN fid="PERCELEN.1386000:10740af721f:-391a">
>
> it says the value of fid does not match simple type xs:ID.

GeoServer/GeoTools generally tries to be smart and figure out a good fid
for you.  But it looks like it's failing.  Is this on oracle?  Do you
have a primary key defined?  If you have a primary key in any of the
jdbc formats, it generally just uses that as the fid.  How is your
table defined?  If it doesn't have an primary key, then define one.
Unforuntately it won't show up as an attribute any more (which is where
we're erring too far on the side of being smart), but it should be used
for the fid.

best regards,

Chris

>
> Best regards,
> Bart
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of
> 2005
> Visit http://www.jboss.com/services/certification for more
> information
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>




----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: feature-id's and valid GML

Bart van den Eijnden (OSGIS)
Chris,

you were right, my table did not have a primary key defined (I loaded it  
through ogr2ogr). The following statement got everything to work fine wrt  
fid's:

ALTER TABLE PERCELEN ADD CONSTRAINT PERCELEN_PK PRIMARY KEY (OGR_FID);

Thanks.

Best regards,
Bart

On Sun, 30 Oct 2005 15:34:23 +0100, Chris Holmes <[hidden email]>  
wrote:

> Quoting Bart van den Eijnden <[hidden email]>:
>
>> Hi list,
>>
>> how does Geoserver map feature-id's? Can it be coupled to a database
>> column?
>>
>> I now seem to be using some kind of auto-generated fid's, but this
>> causes the GML to be invalid (at least according to XMLSpy):
>>
>>         <rwsagi:PERCELEN fid="PERCELEN.1386000:10740af721f:-391a">
>>
>> it says the value of fid does not match simple type xs:ID.
>
> GeoServer/GeoTools generally tries to be smart and figure out a good fid
> for you.  But it looks like it's failing.  Is this on oracle?  Do you
> have a primary key defined?  If you have a primary key in any of the
> jdbc formats, it generally just uses that as the fid.  How is your
> table defined?  If it doesn't have an primary key, then define one.
> Unforuntately it won't show up as an attribute any more (which is where
> we're erring too far on the side of being smart), but it should be used
> for the fid.
>
> best regards,
>
> Chris
>
>>
>> Best regards,
>> Bart
>>
>>
>> -------------------------------------------------------
>> This SF.Net email is sponsored by the JBoss Inc.
>> Get Certified Today * Register for a JBoss Training Course
>> Free Certification Exam for All Training Attendees Through End of
>> 2005
>> Visit http://www.jboss.com/services/certification for more
>> information
>> _______________________________________________
>> Geoserver-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
>
>
>
> ----------------------------------------------------------
> This mail sent through IMP: https://webmail.limegroup.com/
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.
> Get Certified Today * Register for a JBoss Training Course
> Free Certification Exam for All Training Attendees Through End of 2005
> Visit http://www.jboss.com/services/certification for more information
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users