[Geoserver-users] FeatureTtypes and Views on DB2 SE

Folks,

can a FeatureType be built on a DB2 SE view (like in Oracle Spatial) or just on DB2 SE tables ?

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

It should work, although I haven't actually tried it with GeoServer. We regularly use views with ESRI's ArcSDE.

I'll try it when I get my GeoServer environment functional again.

When you create the view, you should use the 'db2se register_spatial_column' command for the spatial column in the view.

At 06:10 AM 8/4/2006, Luca Morandini wrote:

Folks,

can a FeatureType be built on a DB2 SE view (like in Oracle Spatial) or
just on DB2 SE tables ?

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

David,

Did you find that you needed to treat ArcSDE spatial views any differently
than ArcSDE spatial tables? I am able to use GeoServer to query spatial
tables to return WFS but it fails when querying spatial views, even though
both appear as SDE Feature Classes within the ArcGIS environment.

To isolate this problem, I created a simple ArcSDE spatial view (V_Location)
that returns a few columns from an ArcSDE spatial table (T_Location) using
the 'sdetable -o create_view' command and tried to request WFS from both
feature classes. The following request successfully returns GML for the
T_Location table
http://server:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=mtri:SDE_NRCS.DBO.T_Location

but, the following request to the V_Location spatial view fails
http://server:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=mtri:SDE_NRCS.DBO.V_Location
and returns the an Illegal Argument error
<ServiceException>
      java.lang.IllegalArgumentException: The passed type info and results
do not seems to belong to the same type
</ServiceException>

The wrapper log contains the following:
INFO | jvm 1 | 2006/12/07 16:32:28 | Caused by:
java.lang.IllegalArgumentException: The passed type info and results do not
seems to belong to the same type
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.wfs.responses.GetFeatureResults.addFeatures(GetFeatureResults.java:171)
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureResponse.java:345)
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureResponse.java:155)
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:528)

Here is what I am running:
ArcSDE 9.1 (SQL Server 2000)
GeoServer 1.4.0 RC3

David Adler wrote:

It should work, although I haven't actually tried it with GeoServer. We
regularly use views with ESRI's ArcSDE.

I'll try it when I get my GeoServer environment functional again.

When you create the view, you should use the 'db2se
register_spatial_column' command for the spatial column in the view.

--
View this message in context: http://www.nabble.com/FeatureTtypes-and-Views-on-DB2--SE-tf2050362.html#a7748648
Sent from the GeoServer - User mailing list archive at Nabble.com.

Tyler,

That's strange, as we're running geoserver on SDE views as well (ArcSDE 9.0 on oracle 9i) and I *think* everything's working on our end.

Let me double-check a view-based sde table. Here goes:

1) First I'll double-check that I have a view defined in sde
sfarber@*** WFS $ sdetable -o describe_reg -t GISDATA.TOWNS_POLY_V_AREACODE -s *** -u ***

Enter Database User password:

ArcSDE 9.0 Oracle9i Build 1191 Wed Sep 28 11:12:15 PDT 2005
Attribute Administration Utility
-----------------------------------------------------

----------------------------------------------------------------
Table Owner : GISDATA
Table Name : TOWNS_POLY_V_AREACODE
Registration Id : 3534
Row ID Column :
Row ID Column Type :
Row Lock :
Minimum Row ID :
Dependent Objects : Layer, View
Registration Date : Fri Jul 15 12:33:12 2005
Config. Keyword : DEFAULTS
User Privileges : SELECT
Visibility : Visible

Yep, looks like GISDATA.TOWNS_POLY_V_AREACODE is indeed a view. Now I'll try a wfs getfeature:

I've attached my query to this email. Here's the command line:

sfarber@*** WFS $ wget --post-file="getfeature-towns_poly_v_areacode.xml" -O - -q http://64.119.128.70/geoserver/wfs

Response is:
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:gml="http:/
/www.opengis.net/gml" xmlns:massgis="http://massgis.state.ma.us/featuretype&quot; xmlns:xsi="http://www.w3.org/2001/XMLSch
ema-instance" xsi:schemaLocation="http://massgis.state.ma.us/featuretype http://64.119.128.70/geoserver/wfs/DescribeF
eatureType?typeName=massgis:GISDATA.TOWNS_POLY_V_AREACODE http://www.opengis.net/wfs http://64.119.128.70/geoserver/s
chemas/wfs/1.0.0/WFS-basic.xsd"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#26986&quot;&gt;&lt;gml:
coordinates xmlns:gml="http://www.opengis.net/gml&quot; decimal="." cs="," ts=" ">235620.09359037,859241.120856 243179.643
59038,867296.120856</gml:coordinates></gml:Box></gml:boundedBy><gml:featureMember><massgis:GISDATA.TOWNS_POLY_V_AREAC
ODE fid="GISDATA.TOWNS_POLY_V_AREACODE.436"><massgis:SHAPE><gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/
epsg.xml#26986"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates xmlns:gml="http
://www.opengis.net/gml" decimal="." cs="," ts=" ">242457.40359038,866360.560856 241437.29359038,866181.500856 239503.
86359038,865857.620856 239257.06359037,867296.120856 235620.09359037,866684.500856 236609.17359038,861176.940856 2368
93.84359037,859502.440856 236939.06359037,859241.120856 241190.22359037,860978.690856 241466.43359037,861140.190856 2
41556.81359037,861202.500856 242206.81359037,861633.000856 243179.64359038,862026.440856 243113.00359038,862425.69085
6 242457.40359038,866360.560856</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMe
mber></gml:MultiPolygon></massgis:SHAPE><massgis:TOWN_ID>322</massgis:TOWN_ID><massgis:AREACODE>508/774</massgis:AREA
CODE><massgis:SHAPE.FID>436</massgis:SHAPE.FID></massgis:GISDATA.TOWNS_POLY_V_AREACODE></gml:featureMember></wfs:Feat
ureCollection>

I tried this test (against this view) for a number of different combos of geoserver+oracle (all with ArcSDE 9.0)

* gs-1.4.x-latest + oracle10g == OK
* gs-1.4.x-latest + oracle9i == OK
* gs-1.5.x-recent + oracle10g == OK
* gs-1.5.x-recent + oracle9i == OK

So it's possible that this is an ArcSDE 9.1 issue. It's also possible there's something funky with your view, or that there's something funky with the ArcSDE plugin you're using.

Is there any chance that your SDE instance is publicly available and that I could connect to it from my dev server here? Alternatively, do you feel comfortable digging into the geotools arcsde java api code enough to try and figure out what's going wrong?

Which version of the jsde-sdk/jpde-sdk jar files are you using? Can you give me an sha1sum of them?

--saul

</ServiceException>

The wrapper log contains the following:
INFO | jvm 1 | 2006/12/07 16:32:28 | Caused by:
java.lang.IllegalArgumentException: The passed type info and results do not
seems to belong to the same type
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.wfs.responses.GetFeatureResults.addFeatures(GetFeatureResults.java:171)
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureResponse.java:345)
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.wfs.responses.FeatureResponse.execute(FeatureResponse.java:155)
INFO | jvm 1 | 2006/12/07 16:32:28 | at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:528)

Here is what I am running:
ArcSDE 9.1 (SQL Server 2000)
GeoServer 1.4.0 RC3

Saul,

Unfortunately, our SDE instance is not publicly accessible (at least
currently). And I'm not too comfortable digging into the geotools arcsde
java api code, since I don't have experience debugging java code.

I am using the sdk files from J2SE Development Kit 5.0 Update 9
(jdk-1_5_0_09-windows-i586-p.exe). Here are the sha1sum values for the sdk
jar files...

O:\Program\GeoServer_1_4_0_RC3\webapps\geoserver\WEB-INF\lib>c:\util\sha1sum
jsd
e91_sdk.jar
82d325a45f7653bb687f3e41122ae764279b77ee jsde91_sdk.jar

O:\Program\GeoServer_1_4_0_RC3\webapps\geoserver\WEB-INF\lib>c:\util\sha1sum
jpe
91_sdk.jar
839fdd339295d71844cf9bad7f16652ab6e390f7 jpe91_sdk.jar

- Tyler

Saul Farber-2 wrote:

Tyler,

That's strange, as we're running geoserver on SDE views as well (ArcSDE
9.0 on oracle 9i) and I *think* everything's working on our end.

...

So it's possible that this is an ArcSDE 9.1 issue. It's also possible
there's something funky with your view, or that there's something funky
with the ArcSDE plugin you're using.

Is there any chance that your SDE instance is publicly available and
that I could connect to it from my dev server here? Alternatively, do
you feel comfortable digging into the geotools arcsde java api code
enough to try and figure out what's going wrong?

Which version of the jsde-sdk/jpde-sdk jar files are you using? Can you
give me an sha1sum of them?

--
View this message in context: http://www.nabble.com/FeatureTtypes-and-Views-on-DB2--SE-tf2050362.html#a7758809
Sent from the GeoServer - User mailing list archive at Nabble.com.