Hi David,
 
"However, if the Shapefiles are already on the server, you can POST an XML
configuration to /rest/workspaces/default/datastores/ which references that file
path and create a store that way"
 
really?? Would you be so kind to send a XML-configuration example?
 
Best regards
Florian


 


David Winslow <[email protected]> hat am 4. Oktober 2010 um 14:20
geschrieben:


> GeoServer does not support the .external or .file notation for Shapefiles;
> only GeoTIFFs.  However, if the Shapefiles are already on the server, you can
> POST an XML configuration to /rest/workspaces/default/datastores/ which
> references that file path and create a store that way.  Issue a GET request
> for an existing Shapefile datastore for an example configuration.
> Hope this helps.
> --
> David Winslow
> OpenGeo - http://opengeo.org/
> 
> 
> On Fri, Oct 1, 2010 at 3:15 PM, Mckeane <[email protected]
> [mailto:[email protected]] >wrote:
> 
> > 
> > Hello,
> >  I want to be able to reference shape files that are stored in an external
> > directory without making an  actual copy of the files using geo-server.
> >    I used the use case provided by in the
> >   Geo-server documentation for uploading a shape file and it works, however
> > tweaking produced errors.
> > 
> > Example given Below:
> > a) Use case for uploading shapefiles works
> > 
> >    [u...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XPUT -H
> >   'Content-type: application/zip' --data-binary
> >   @/home/User/shapefiles/test1.zip
> > 
> > http://localhost:9090/geoserver/rest/workspaces/tests/datastores/test1/file.shp
> >   * 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/tests/datastores/test1/file.shp 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: application/zip
> >   > Content-Length: 119693
> > 
> > - Ignored:
> >   > Expect: 100-continue
> >   >
> >   < HTTP/1.1 100 Continue
> >   < HTTP/1.1 201 Created
> >   < Date: Fri, 01 Oct 2010 15:56:08 GMT
> >   < Server: Noelios-Restlet-Engine/1.0..8
> >   < Transfer-Encoding: chunked
> >   <
> >   * Connection #0 to host localhost left intact
> >   * Closing connection #0
> > 
> > 
> >   If  I use the following to  reference the data externally I get an error.
> > Errors received when trying to reference the file(s) externally
> > 
> >   [u...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XPUT -H
> > 'Content-type:
> >   application/zip' -d file:/home/User/shapefiles/test1.zip
> > 
> > http://localhost:9090/geoserver/rest/workspaces/tests/datastores/test1/external.shp
> >   * 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/tests/datastores/test1/external.shp
> >   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: application/zip
> >   > Content-Length: 37
> >   >
> >   < HTTP/1.1 400 Bad Request
> >   < Transfer-Encoding: chunked
> >   < Server: Jetty(6.1.8)
> >   <
> >   * Connection #0 to host localhost left intact
> >   * Closing connection #0
> >   Could not determine format. Try setting the Content-type
> >   header.[u...@~/geoserver-2.0.2]$
> > 
> > 
> > 
> >   It seem to be a syntax error, However, I'm not able to figure out the
> >   errors.
> > 
> >   Any Help would be greatly appreciated.
> > 
> >       Regards,
> >   --Mckeane
> > 
> > --
> > View this message in context:
> > http://old.nabble.com/Using-Geo-server-to-reference-external-data-stores.-tp29859302p29859302.html
> > Sent from the GeoServer - User mailing list archive at Nabble.com.
> > 
> > 
> > ------------------------------------------------------------------------------
> > Start uncovering the many advantages of virtual appliances
> > and start using them to simplify application deployment and
> > accelerate your shift to cloud computing.
> > http://p.sf.net/sfu/novell-sfdev2dev
> > _______________________________________________
> > Geoserver-users mailing list
> > [email protected]
> > [mailto:[email protected]]
> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >
------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to