Hello there.
I have a problem with WFS-getFeature too with the spatial data from MySQL5.
I found the problem is the returned xml put wrong namespace for the
features.
The table (named as 'geom') was created in MySQL5.0.20 as InnoDB type.
--------------------------------------------------------------
Table: geom
(Filed) (Type)
-----------------------------------------
the_geom LineString
name varchar(20)
id varchar(5) --> Primary key
-----------------------------------------------------------------
I have successful connected the table to GeoServer (version 1.3.0a), and it
was defined in the catalog.xml as below:
<datastore namespace = "topp" enabled = "true" id = "mysqlDB" >
So I specified the namespace is topp. But after rung the WFS-getFeature
request at the sample request page, the return xml has:
- <gml:featureMember>
- <gml:geom fid="geom.1">
- <gml:the_geom>
.............
<gml:name>road A</gml:name>
But the namespace for the feature type 'geom' and its property 'name' should
be "topp"!! not "gml", which results in that a query to this returned xml
for requesting all features of "topp:geom" will get nothing. And I found
that's why I always get a rendering exception when trying to display the WFS
feature on uDig.
However, there is no such problem with shape file (I have only tried to
create new shape file).
Can anyone help me out? And that would be a great appreciation.!!!!
Cheers.
Jack
Hmmm... Unfortunately MySQL isn't very well supported, the datastore is probably not getting its namespace set properly. If you're willing to dig in to the code I could tell you where to look...
Chris
Mr. Jack,Fan ZHANG wrote:
Hello there.
I have a problem with WFS-getFeature too with the spatial data from MySQL5.
I found the problem is the returned xml put wrong namespace for the
features.
The table (named as 'geom') was created in MySQL5.0.20 as InnoDB type. --------------------------------------------------------------
Table: geom
(Filed) (Type)
-----------------------------------------
the_geom LineString
name varchar(20)
id varchar(5) --> Primary key
-----------------------------------------------------------------
I have successful connected the table to GeoServer (version 1.3.0a), and it
was defined in the catalog.xml as below:
<datastore namespace = "topp" enabled = "true" id = "mysqlDB" >
So I specified the namespace is topp. But after rung the WFS-getFeature
request at the sample request page, the return xml has:
- <gml:featureMember>
- <gml:geom fid="geom.1">
- <gml:the_geom>
.............
<gml:name>road A</gml:name>
But the namespace for the feature type 'geom' and its property 'name' should
be "topp"!! not "gml", which results in that a query to this returned xml
for requesting all features of "topp:geom" will get nothing. And I found
that's why I always get a rendering exception when trying to display the WFS
feature on uDig.
However, there is no such problem with shape file (I have only tried to
create new shape file).
Can anyone help me out? And that would be a great appreciation.!!!!
Cheers.
Jack
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org