Hi Mckeane,

I just applied the patch (slightly modified) and things seem be working as
expected for me. Can you give the next nightly build a try and see if your
problem persists. Thanks.

-Justin

On Fri, Oct 15, 2010 at 8:35 AM, Mckeane <mckeane.tho...@gmail.com> wrote:

>
> Hello
>     Using the patch ( http://jira.codehaus.org/browse/GEOS-3999 ) I am now
> able to reference shape files that are not in geoserver's data directory as
> with geotiff's for example using the following configuration:
> curl -u admin:geoserver -v -XPUT -H 'Content-type: text/plain' -d
> 'file:/home/User/shapefiles/test4.shp'
>
> http://localhost:9090/geoserver/rest/workspaces/Test/datastores/test4/external.shp
>
> I get the following result:
>
> [u...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XPUT -H
> 'Content-type:
> text/plain' -d 'file:/home/User/shapefiles/test4.shp'
>
> http://localhost:9090/geoserver/rest/workspaces/Test/datastores/test4/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/Test/datastores/test4/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: text/plain
> > Content-Length: 37
> >
> < HTTP/1.1 201 Created
> < Date: Fri, 15 Oct 2010 13:53:26 GMT
> < Server: Noelios-Restlet-Engine/1.0..8
> < Transfer-Encoding: chunked
> <
> * Connection #0 to host localhost left intact
> * Closing connection #0
> [u...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XGET
>
> http://localhost:9090/geoserver/rest/workspaces/Test/datastores/test4/featuretypes/test4.xml
> * 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'
> > GET
> > /geoserver/rest/workspaces/Test/datastores/test4/featuretypes/test4.xml
> > 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: */*
> >
> < HTTP/1.1 200 OK
> < Date: Fri, 15 Oct 2010 13:54:21 GMT
> < Server: Noelios-Restlet-Engine/1.0..8
> < Content-Type: application/xml
> < Transfer-Encoding: chunked
>
> The feature types and layers are created automatically. What I noticed
> however, is that for example in this case two data stores with the same
> name
> are found in stores. If I delete anyone of these replicas I would be unable
> to preview the shape files in "Openlayers." Another issue is that some of
> the attributes are not added to the UI of Geoserver such as the
> connectionParameters url. However, if i do a get request for the data store
> these attributes (connectIonParameters) are returned in the result.
>
> Using external.geotiff to reference geotiff's outside of  geoserver's data
> directory loads these attributes in Geoserver's UI and only one entry of
> the
> store is entered. If the coverage store was geotiffTest only one entry
> would
> be found in store.
> Th following conigurtaion references geotiff's outside of Geoserver's data
> directory.
>
> curl -u admin:geoserver -v -XPUT -H 'Content-type:text/plain' -d
> 'file:/home/User/geotiffTest/geotiftest.tif'
>
> http://localhost:9090/geoserver/rest/workspaces/Test/coveragestores/tiffTest/external.geotiff?configure=first\&coverageName=tiffTest
>
> [u...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XGET
> http://localhost:9090/geoserver/rest/workspaces/Test/datastores/test4.xml
> * 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'
> > GET /geoserver/rest/workspaces/Test/datastores/test4.xml 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: */*
> >
> < HTTP/1.1 200 OK
> < Date: Fri, 15 Oct 2010 13:56:07 GMT
> < Server: Noelios-Restlet-Engine/1.0..8
> < Content-Type: application/xml
> < Transfer-Encoding: chunked
> <
> <dataStore>
>  <name>test4</name>
>  <enabled>true</enabled>
>  <workspace>
>    <name>Test</name>
>    <atom:link xmlns:atom="http://www.w3.org/2005/Atom"; rel="alternate"
> href="http://localhost:9090/geoserver/rest/workspaces/Test.xml";
> type="application/xml"/>
>  </workspace>
>  <connectionParameters>
>    <entry key="url">file:/home/User/shapefiles/test4.shp</entry>
>    <entry key="namespace">http://Test.org/layers</entry>
>  </connectionParameters>
>  <featureTypes>
>    <atom:link xmlns:atom="http://www.w3.org/2005/Atom"; rel="alternate"
> href="
> http://localhost:9090/geoserver/rest/workspaces/Test/datastores/test4/featuretypes.xml
> "
> type="application/xml"/>
>  </featureTypes>
> * Connection #0 to host localhost left intact
> * Closing connection #0
> </dataStore>
>
> Could you let me know if I am doing something wrong or if there is
> something
> else that I need to do. Any help with this would be greatly appreciated.
> This might be a minor issue but I was just thinking if I had to add over a
> thousand shape files to geoserver, I would see over two thousand since the
> entry is added twice in the store. As stated before this is not the case
> with referencing getiff's externally.
>
> Best Regards
> Mckeane Thomas
> --
> View this message in context:
> http://old.nabble.com/Geoserver%27s-User-Interface-and-curl%27s-configuration-for-shapefiles-referenced-outside-geoserver%27s-data-directory-tp29972196p29972196.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to