Hello Ms. Aime,
    I am now able to successfully reference the shape files in geoserver
without copying such files to geoserver's data directory using the patch
downloaded: the configuration used is as follows:

[gr...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XPUT -H
'Content-type: text/plain' -d 'file:/home/grass/shapefiles/test3.shp'
http://localhost:9090/geoserver/rest/workspaces/icens/datastores/test3/external.shp?configure=first
* About to connect() to localhost port 9090 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 9090 (#0)
* Server auth using Basic with user 'admin'
> PUT
> /geoserver/rest/workspaces/icens/datastores/test3/external.shp?configure=first
> HTTP/1.1
> Authorization: Basic YWRtaW46Z2Vvc2VydmVy
> User-Agent: curl/7.16.4 (i386-redhat-linux-gnu) libcurl/7.16.4
> OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.8
> Host: localhost:9090
> Accept: */*
> Content-type: text/plain
> Content-Length: 37
>
< HTTP/1.1 201 Created
< Date: Mon, 11 Oct 2010 16:45:26 GMT
< Server: Noelios-Restlet-Engine/1.0..8
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection #0

What I noticed, however, was that two datastores with the same name were
created in our case test3 and also for the connection parameters these are
not loaded as in the case of the referencing geotiff's outside of
geoserver's data directory. Also if I delete one of the datastore then the
layer for that store is also deleted and I'm unable to see a preview of the
shape file. 





Andrea Aime-5 wrote:
> 
> On Fri, Oct 8, 2010 at 8:02 PM, Mckeane <[email protected]> wrote:
>>
>> Hello Mr. Scarr,
>>   I am faced with the same situation in which I am able to reference a
>> shape file that is not in the geoserver's data directory. However, in
>> order
>> to preview the shape file I would have to manually create the layers and
>> publish it for the file from the add a new resource section under layers
>> section of the Geoserver's UI. If the files are uploaded into the data
>> directory the feature types are automatically created. The same applies
>> for
>> geotiff's that are refernced externally using the external.geotiff?
>> examples. Since shapefiles in geoserver does not support external.shp (I
>> was
>> told).
>>
>> If there is any further information that could help me solve this problem
>> and applying this patch please could you relay such.
>> Thank you in advance
> 
> As far as I know it's working as advertised: when you manually create a
> feature
> type by PUT you also have to manually create the layer.
> Uploading the shapefile is probably giving the two in one shot as a
> convenience
> 
> Cheers
> Andrea
> 
> -- 
> -----------------------------------------------------
> Ing. Andrea Aime
> Senior Software Engineer
> 
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> 
> phone: +39 0584962313
> fax:     +39 0584962313
> 
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
> 
> -----------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Creating-a-FeatureType-using-REST-tp28763086p29937526.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to