Hello, I am having some trouble with a getFeature request using a *BBOX* on
a custom featuretype.

I have generated a featuretype to work with an application schema datastore
as defined below:

<featureType>
  <id>LCDB2_lcdb2_test_featuretype</id>
  <name>lcdb2_test</name>
  <nativeName>lcdb2_test</nativeName>
  <namespace>
    <id>LCDB2_namespace</id>
  </namespace>
  <title>... TITLE ...</title>
  <abstract>... ABSTRACT ...</abstract>
  <nativeCRS>GEOGCS["GCS_WGS_1984",
  DATUM["D_WGS_1984",
    SPHEROID["WGS_1984", 6378137.0, 298.257223563]],
  PRIMEM["Greenwich", 0.0],
  UNIT["degree", 0.017453292519943295],
  AXIS["Longitude", EAST],
  AXIS["Latitude", NORTH]]</nativeCRS>
  <srs>EPSG:4326</srs>
  <nativeBoundingBox>
    <minx>-180.0</minx>
    <maxx>180.0</maxx>
    <miny>-90.0</miny>
    <maxy>90.0</maxy>
    <crs>EPSG:4326</crs>
  </nativeBoundingBox>
  <latLonBoundingBox>
    <minx>-180.0</minx>
    <maxx>180.0</maxx>
    <miny>-90.0</miny>
    <maxy>90.0</maxy>
    <crs>EPSG:4326</crs>
  </latLonBoundingBox>
  <projectionPolicy>NONE</projectionPolicy>
  <enabled>true</enabled>
  <metadata>
    <entry key="cachingEnabled">false</entry>
  </metadata>
  <store class="dataStore">
    <id>LCDB2_lcdb2_test_datastore</id>
  </store>
  <maxFeatures>0</maxFeatures>
  <numDecimals>0</numDecimals>
</featureType>

I query this featuretype with:

http://127.0.0.1:8082/*geoserver*/*wfs*?&;<http://127.0.0.1:8082/geoserver/wfs?&;>
service=*WFS*&
version=1.1.0&
request=GetFeature&typeName=LCDB2:lcdb2_test&
*bbox*
=19567068.48958,-4695788.62634,19567393.34695,-4695454.21434,EPSG:900913
&maxfeatures=10

Which returns an empty feature collection.

If I create another datastore for the same data using the *GeoServer* GUI it
will produce this featuretype which was used as a basis for the custom one:

<featureType>
  <id>FeatureTypeInfoImpl-c82da9a:12c0aa8973b:-7ff9</id>
  <name>lcdb2_shp</name>
  <nativeName>land-cover-database-version-2-lcdb2</nativeName>
  <namespace>
    <id>NamespaceInfoImpl-4e0b98bf:12475d46fdd:-7ffe</id>
  </namespace>
  <title>land-cover-database-version-2-lcdb2</title>
  <nativeCRS>GEOGCS["GCS_WGS_1984",
  DATUM["D_WGS_1984",
    SPHEROID["WGS_1984", 6378137.0, 298.257223563]],
  PRIMEM["Greenwich", 0.0],
  UNIT["degree", 0.017453292519943295],
  AXIS["Longitude", EAST],
  AXIS["Latitude", NORTH]]</nativeCRS>
  <srs>EPSG:4326</srs>
  <nativeBoundingBox>
    <minx>-180.0</minx>
    <maxx>180.0</maxx>
    <miny>-90.0</miny>
    <maxy>90.0</maxy>
    <crs>EPSG:4326</crs>
  </nativeBoundingBox>
  <latLonBoundingBox>
    <minx>-180.0</minx>
    <maxx>180.0</maxx>
    <miny>-90.0</miny>
    <maxy>90.0</maxy>
    <crs>EPSG:4326</crs>
  </latLonBoundingBox>
  <projectionPolicy>NONE</projectionPolicy>
  <enabled>true</enabled>
  <metadata>
    <entry key="cachingEnabled">false</entry>
  </metadata>
  <store class="dataStore">
    <id>DataStoreInfoImpl-c82da9a:12c0aa8973b:-7ffb</id>
  </store>
  <maxFeatures>0</maxFeatures>
  <numDecimals>0</numDecimals>
</featureType>

And querying this featuretype with:

http://127.0.0.1:8082/*geoserver*/*wfs*&;<http://127.0.0.1:8082/geoserver/wfs&;>
service=*WFS*&
version=1.1.0&
request=GetFeature&
typeName=topp:lcdb2_shp&
*bbox*
=19567068.48958,-4695788.62634,19567393.34695,-4695454.21434,EPSG:900913&
maxfeatures=10

I get the expected features as seen on my map using WMS

If I inlcude SRS=EPSG:900913 in the requests the results are the same.
I have also tried changing the projection policy in the custom feature type
to REPROJECT_TO_DECLARED.

The custom feature type has been setup using the app schema tutorial and the
getFeature will work if no *BBOX* is supplied.

Any ideas why it will work with the auto generated featuretype and not the
custom one?

Cheers

Sina
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to