Jelmer,

Also, when using WFS from Oracle, you should add the wfs_extent or
ows_extent metadata tags. Otherwise MapServer will request Oracle to do a
convex_hull to get the extent of your data. On large datasets, this can take
a while. Setting the extent metadata tag bypasses this check and uses the
value you specify.

Mike


-- 
Michael Smith
RSGIS Center
US Army Corps of Engineers



On 11/18/09 7:54 AM, "Jelmer Baas" <b...@speerit.nl> wrote:

> Jukka,
> 
> Thanks for the little tip! I just tested the "test url" you gave me, and it
> also didn't return anything. After checking the log files I found this:
> 
> [Wed Nov 18 13:50:46 2009].176000 msOracleSpatialLayerGetShape():
> OracleSpatial error. Error parsing OracleSpatial DATA variable for query. To
> execute query functions you need to define one unique column [USING UNIQUE
> <#column>]
> 
> Chaning the query from
> DATA "GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g"
> to
> DATA "GEOLOC FROM ADDRESS USING UNIQUE ID SRID 90112 VERSION 10g"
> 
> Did the trick. Not too bright of me that I didn't check the log file, I admit,
> but might I recommend outputting this message to the client anyway?
> 
> Thanks for the help, I can now continue fiddling with projections, my
> favorite! *sigh* :)
> 
> Regards,
> Jelmer
> 
>> -----Original Message-----
>> From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi]
>> Sent: woensdag 18 november 2009 13:47
>> To: Jelmer Baas; mapserver-users@lists.osgeo.org
>> Subject: Re: [mapserver-users] MapServer, WFS and Oracle
>> 
>> Hi,
>> 
>> If you haven't done it yet, check that you can for sure get
>> some data out of your service.
>> 
>> mapserv.exe?map=address.map&typename=address&SERVICE=WFS&VERSI
>> ON=1.0.0&REQUEST=GetFeature&MaxFeatures=10
>> 
>> If yes, have a look at the returned data and see what kind of
>> coordinates it likes to send you. Just to be sure that your
>> BBOX is correct. Also, add DEBUG=5 to the layer definitions
>> and look at the Mapserver errorfile to understand more about
>> what is happening.
>> 
>> -Jukka-
>> 
>>> -----Alkuperäinen viesti-----
>>> Lähettäjä: Jelmer Baas [mailto:b...@speerit.nl]
>>> Lähetetty: 18. marraskuuta 2009 14:39
>>> Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
>>> Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
>>> 
>>> Bart, Jukka,
>>> 
>>> The shoes taste wonderful. The request comes from OpenLayers,
>>> and I can't find how to change it to WFS 1.1, but that'll be
>>> another Google search, soon. Right now I thought it'd be
>>> smart to see if I at least can get *some* results, manually.
>>> This however also fails.
>>> 
>>> My current request
>>> mapserv.exe?map=address.map&typename=address&SERVICE=WFS&VERSI
>>> ON=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A28992&BBOX=125474.00000
>> 0,381967.999850,206652.000100,470382.335300
>>> 
>>> The coordinates come from a previous request (gml:boundedBy)
>>> and should definatly contain some points. An select count(id)
>>> from address where x > 125474 and y > 206652 and x < 381967
>>> and y < 470382 returns 24002 rows (the geo object is also
>>> saved as plain X/Y).
>>> 
>>> For completeness, here's my current MAP file:
>>> 
>>> MAP
>>> NAME Test
>>> STATUS ON
>>> UNITS meters
>>> FONTSET "fontset.txt"
>>> 
>>> OUTPUTFORMAT
>>> NAME aggpng24
>>> DRIVER AGG/PNG
>>> TRANSPARENT ON
>>> IMAGEMODE RGBA
>>> MIMETYPE "image/png"
>>> EXTENSION "png"
>>> END
>>> 
>>>     WEB
>>>       METADATA
>>>         "wms_title" "Test"
>>>         "wfs_title" "Test"
>>>         "wms_srs" "EPSG:28992 "
>>>         "wfs_srs" "EPSG:28992 "
>>>         "wms_onlineresource" "<url>"
>>>         "wfs_onlineresource" "<url>"
>>>       END # METADATA
>>>     END #web
>>> SYMBOLSET "symbols_mapinfo2.sym"
>>> PROJECTION
>>> "init=epsg:28992"
>>> END
>>> LAYER
>>> NAME address
>>> TYPE point
>>> CONNECTIONTYPE oraclespatial
>>> DATA "GEOLOC FROM ADDRESS USING SRID 90112 VERSION 10g"
>>> CONNECTION "x/y/z"
>>> DUMP TRUE
>>> PROCESSING "CLOSE_CONNECTION=DEFER"
>>> CLASS
>>> SYMBOL "circle"
>>> OUTLINECOLOR 255 0 0
>>> SIZE 6
>>> NAME "address"
>>> END
>>> PROJECTION
>>> "init=epsg:28992"
>>> END
>>> METADATA
>>> "wfs_title" "address"
>>> "wfs_srs" "EPSG:28992"
>>> "wms_title" "address"
>>> "wms_srs" "EPSG:28992"
>>> "gml_featureid" "ZIPCODE"
>>> "gml_include_items" "ZIPCODE"
>>> END
>>> END
>>>   
>>> END # Map File
>>> 
>>> As you can see, I use the Dutch projection system everywhere.
>>> Yet the request only returns:
>>> <?xml version='1.0' encoding="ISO-8859-1" ?> <wfs:FeatureCollection
>>>    xmlns:ms="http://mapserver.gis.umn.edu/mapserver";
>>>    xmlns:wfs="http://www.opengis.net/wfs";
>>>    xmlns:gml="http://www.opengis.net/gml";
>>>    xmlns:ogc="http://www.opengis.net/ogc";
>>>    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>    xsi:schemaLocation="http://www.opengis.net/wfs
>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
>>>                        http://mapserver.gis.umn.edu/mapserver
>>> <url>/mapserv.exe?map=address.map&amp;SERVICE=WFS&amp;VERSION=
>>> 1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=address&amp
>>> ;OUTPUTFORMAT=XMLSCHEMA">
>>>       <gml:boundedBy>
>>> <gml:Box srsName="EPSG:28992">
>>> 
>>> <gml:coordinates>125474.000000,381967.999850
>>> 206652.000100,470382.335300</gml:coordinates>
>>> </gml:Box>
>>>       </gml:boundedBy>
>>> </wfs:FeatureCollection>
>>> 
>>> Any more help would be greatly appreciated.
>>> 
>>> Regards,
>>> Jelmer
>>> 
>>>> Hi,
>>>> 
>>>> I hope you have tasty shoes.  WFS 1.0.0 does officially
>>> support only 
>>>> one projection. I am not sure how Marverver has implemented
>>> it, with 
>>>> Geoserver it is possible to use also other projections by adding
>>>> projection parameter to request.
>>>> However, I would try GetFeature request by using BBOX in native
>>>> projection.
>>>> 
>>>> -Jukka Rahkonen-
>>>> 
>>>>> -----Alkuperäinen viesti-----
>>>>> Lähettäjä: mapserver-users-boun...@lists.osgeo.org
>>>>> [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta
>>>> Jelmer Baas
>>>>> Lähetetty: 18. marraskuuta 2009 13:06
>>>>> Vastaanottaja: Rahkonen Jukka; mapserver-users@lists.osgeo.org
>>>>> Aihe: RE: [mapserver-users] MapServer, WFS and Oracle
>>>>> 
>>>>> Jukka,
>>>>> 
>>>>> Thanks for the quick reply. The request is:
>>>>> 
>>>>> mapserv.exe?map=address.map&typename=address&SERVICE=WFS&VERSI
>>>>> ON=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A4326&BBOX=1.17194606291
>>>> 7749,52.038473357169345,5.173921509856943,52.03887593415947
>>>>> 
>>>>> (Very zoomed out)
>>>>> 
>>>>> If this is another projection issue, I'm going to eat
>> my shoe. ;)
>>>>> 
>>>>> Regards,
>>>>> Jelmer
>>>>> 
>>>>>> -----Original Message-----
>>>>>> From: Rahkonen Jukka [mailto:jukka.rahko...@mmmtike.fi]
>>>>>> Sent: woensdag 18 november 2009 11:51
>>>>>> To: Jelmer Baas; mapserver-users@lists.osgeo.org
>>>>>> Subject: Re: [mapserver-users] MapServer, WFS and Oracle
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> You seem not to get even a single feature back, all you
>>> get is an 
>>>>>> empty bounding box. How does you GetFeature request look like?
>>>>>> 
>>>>>> -Jukka Rahkonen-
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> -----Alkuperäinen viesti-----
>>>>>>> Lähettäjä: mapserver-users-boun...@lists.osgeo.org
>>>>>>> [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta
>>>>>> Jelmer Baas
>>>>>>> Lähetetty: 18. marraskuuta 2009 12:11
>>>>>>> Vastaanottaja: mapserver-users@lists.osgeo.org
>>>>>>> Aihe: [mapserver-users] MapServer, WFS and Oracle
>>>>>>> 
>>>>>>> Hello list,
>>>>>>> 
>>>>>>> I'm trying to get MapServer running as a WFS server with
>>>>> an Oracle
>>>>>>> data source. When using TAB files I have no problem, also
>>>>> using the
>>>>>>> Oracle datasource and letting MapServer draw it (WMS) works
>>>>>>> properly.
>>>>>>> 
>>>>>>> However, the WFS request only returns one result (a
>>>>> correct one). My
>>>>>>> total resulting XML is:
>>>>>>> <wfs:FeatureCollection
>>>>>> xsi:schemaLocation="http://www.opengis.net/wfs
>>>>>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
>>>>>>> http://mapserver.gis.umn.edu/mapserver
>>>>>>> 
>> http://x.x.x/scripts/mapserv.exe?map=address.map&SERVICE=WFS&V
>>>>>>> ERSION=1.0
>>>>>>> 
>> .0&REQUEST=DescribeFeatureType&TYPENAME=address&OUTPUTFORMAT=X
>>>>>>> MLSCHEMA">
>>>>>>> <gml:boundedBy>
>>>>>>> <gml:Box srsName="EPSG:4326">
>>>>>>> <gml:coordinates>5.172200,52.038485
>>>>>>> 5.173701,52.038853</gml:coordinates>
>>>>>>> </gml:Box>
>>>>>>> </gml:boundedBy>
>>>>>>> </wfs:FeatureCollection>
>>>>>>> 
>>>>>>> There should be more results (confirmed by the WMS
>>> image and by 
>>>>>>> monitoring the query in Oracle). I also set DUMP to
>> true and 
>>>>>>> "gml_include_items" "all" in my layer METADATA, so I also
>>>>> expected
>>>>>>> more fields. My layer definition is as follows:
>>>>>>> 
>>>>>>> LAYER
>>>>>>> NAME address
>>>>>>> TYPE point
>>>>>>> CONNECTIONTYPE oraclespatial
>>>>>>> DATA "GEOLOC FROM ADDRESS USING SRID
>>>> 90112 VERSION 10g"
>>>>>>> CONNECTION "x/y...@z"
>>>>>>> DUMP TRUE
>>>>>>> PROCESSING "CLOSE_CONNECTION=DEFER"
>>>>>>> CLASS
>>>>>>> SYMBOL "circle"
>>>>>>> OUTLINECOLOR 255 0 0
>>>>>>> SIZE 6
>>>>>>> NAME "address"
>>>>>>> END
>>>>>>> PROJECTION
>>>>>>> "init=epsg:28992"
>>>>>>> END
>>>>>>> METADATA
>>>>>>> "wfs_title" "address"
>>>>>>> "wfs_srs" "EPSG:28992 EPSG:900913"
>>>>>>> "wms_title" "address"
>>>>>>> "wms_srs" "EPSG:28992 EPSG:900913"
>>>>>>> "gml_featureid" "ID"
>>>>>>> "gml_include_items" "all"
>>>>>>> END
>>>>>>> END
>>>>>>> 
>>>>>>> Any idea what I'm doing wrong? I'm using MapServer 5.4.2
>>>>> with Oracle
>>>>>>> 10g.
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Jelmer Baas
>>>>>>> _______________________________________________
>>>>>>> mapserver-users mailing list
>>>>>>> mapserver-users@lists.osgeo.org
>>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>>>> 
>>>>>> 
>>>>> _______________________________________________
>>>>> mapserver-users mailing list
>>>>> mapserver-users@lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>> 
>>>> 
>>> 
>> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to