On Wed, Jan 22, 2014 at 12:21 PM, Damiano Albani
<[email protected]>wrote:

> On Wed, Jan 22, 2014 at 11:38 AM, Andrea Aime <
> [email protected]> wrote:
>
>>
>>  Yes, in GeoServer there is one class that knows what a shapefile is,
>> it's the configuration panel
>> where you put the location of the shapefile (and the new importer
>> extension too).
>> Everything else is done via interfaces, and due to security
>> related wrappers, it's normally hard to know what a store is anyways
>> (it's still possible, but hard and not advisable)
>>
>
> That makes sense, indeed.
>
>  For your specific case I believe the issue should be solved at the level
>> of your application:
>> * configure the shapefile using REST config (this is already what you're
>> doing I assume?)
>>
>
> Yes, that's how I upload it.
>
>
>> * make a GetFeature and see if the result is empty
>>
>
> I suppose you mean a request like this:
>
>
> http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=workspace1:39273642-1d56-4044-8561-979019900eac&maxFeatures=1
> "
>
> Then it returns:
>
> <wfs:FeatureCollection [...]>
>   <gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy>
> </wfs:FeatureCollection>
>
> By the way, is that response valid-ish with regard to "gml:null" and
> "unknown" values?
>

Yes, it's valid. Forget about the boundedBy and check if you get any
feature or not in the output (in the one above, you have no features).


>
> In fact, I've just discovered that querying WFS in version 2.0.0 returns a
> more legible result:
>
>
> http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=workspace1:39273642-1d56-4044-8561-979019900eac&count=1
>
> <wfs:FeatureCollection [...] numberMatched="0" numberReturned="0"
> timeStamp="2014-01-22T11:15:10.868Z"/>
>

Different protocols, different requirements, in WFS 1.1 we cannot avoid
adding the boundedBy element (it's mandatory) but it's ok to report it as
gml:null.


>
>
>
>>  * if so, use against REST config to fix the layer bounding box, but
>> don't set it to all zeros,
>>   as some OGC clients may fail if you do so (they don't have anymore a
>> knowledge about where the
>>    layer is in the world, cannot setup a valid request against it), make
>> it represent your area of interest instead
>>
>
> Well, I don't know what would be the proper "area of interest" in my case.
> It has to be "generic".
> And what about setting the bounding box to the whole area of the
> applicable reference system?
>

Yes, that's an idea. Mind, the "whole area application to reference system"
is something that is sometimes not known by GeoServer,
and there is no API that you can use to get it, when GeoServer can extract
it from the EPSG database.
So it would have to be something your application knows instead.

Cheers
Andrea


-- 
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information ==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to