Ok so i did the two things,

First I executed this code,

curl -u admin:geoserver -XPUT -H 'Content-type: text/plain' -d
'file:///var/www/geo/shapefile/csv_shp/Quercus_inopina.shp'
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/csv_shp/Quercus_inopina.shp

Now I am able to see the newly created datastore with the layer
here<http://128.196.142.55:8080/geoserver/rest/workspaces/acme/datastores/csv_shp.html>,
but I am not able to see the layer in the Geoserver GUI Interface. I can
see that there is a new store, csv_shp that has been created but it's layer
details are empty. The path to shapefile is empty. Am I defining the file
path wrong?

Then I took you advise and tried this code,

curl -u admin:geoserver -XPUT -H 'Content-type: text/plain' \
> -d 'file:///var/www/geo/shapefile/csv_shp/Quisqualis_indica.shp' \
>
http://localhost:8080/geoserver/rest/workspaces/acme/datastores/Quisqualis_indica/external.shp

As you said I changed it to external.shp but I am getting this error,

Error persisting DataStoreInfoImpl[Quisqualis_indica] to
/usr/share/opengeo-suite-data/geoserver_data/workspaces/acme/Quisqualis_indica/datastore.xml

Also I tried to remove the csv_shp store that I created from the GUI but it
is not allowing me to remove the store and giving a big JIRA bug error
report <http://dpaste.de/a8mEi/>, saying *Oops something went wrong*.

Any idea what happened? It seems that I can only create a datastore as per
the name of the directory where the shapefiles reside.

Thanks,
Smaran

On Thu, Nov 8, 2012 at 9:57 AM, David Winslow <dwins...@opengeo.org> wrote:

> That should be 'external.shp' instead of Stemmodontia_reticulata. The
> "filename" in this request indicates to GeoServer whether the data is:
>
>    1. In the request (file.shp)
>    2. Already on the server (external.shp)
>    3. Somewhere on the web, to be fetched by GeoServer (url.shp)
>
> Since you are posting a file path you want case 2.
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
> On Thu, Nov 8, 2012 at 12:15 PM, Smaran Harihar 
> <smaran.hari...@gmail.com>wrote:
>
>> Thanks for the reply David. I went through the documentation but is there
>> no way of adding the layer to the Geoserver?
>>
>> I am trying to use the curl command for the existing shapefile,
>>
>> curl -u admin:geoserver -XPUT -H 'Content-type: text/plain' -d
>> 'file:./shapefile/csv_shp/Stemmodontia_reticulata.shp'
>> http://localhost:8080/geoserver/rest/workspaces/opengeo/datastores/Stemmodontia_reticulata/Stemmodontia_reticulata.shp
>>
>> But I keep getting this error,
>>
>> *No such datastore: opengeo,Stemmodontia_reticulata*
>>
>> I have the opengeo workspace but the 
>> document<http://docs.geoserver.org/stable/en/user/restconfig/rest-config-examples/rest-config-examples-curl.html#adding-an-existing-shapefile>
>>  says
>> that the curll command will add a new datastore to the Geoserver, then why
>> am I getting no such datastore error?
>>
>> Thanks,
>> Smaran
>>
>>
>> On Thu, Nov 8, 2012 at 6:33 AM, David Winslow <dwins...@opengeo.org>wrote:
>>
>>> GSConfig is used extensively by GeoNode (http://geonode.org/) and I
>>> believe has some casual users as well.  I (the original developer of this
>>> library) have definitely uploaded shapefiles with it.
>>>
>>> http://dwins.github.com/gsconfig.py/ has some more info and examples.
>>>
>>> --
>>> David Winslow
>>> OpenGeo - http://opengeo.org/
>>>
>>> On Wed, Nov 7, 2012 at 11:32 PM, Smaran Harihar <
>>> smaran.hari...@gmail.com> wrote:
>>>
>>>> Has anybody used gsconfig.py<https://github.com/dwins/gsconfig.py/wiki>to 
>>>> connect with the Geoserver and upload shapefiles?
>>>>
>>>> --
>>>> Thanks & Regards
>>>> Smaran Harihar
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Everyone hates slow websites. So do we.
>>>> Make your web apps faster with AppDynamics
>>>> Download AppDynamics Lite for free today:
>>>> http://p.sf.net/sfu/appdyn_d2d_nov
>>>> _______________________________________________
>>>> Geoserver-users mailing list
>>>> Geoserver-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>
>>>>
>>>
>>
>>
>> --
>> Thanks & Regards
>> Smaran Harihar
>>
>>
>


-- 
Thanks & Regards
Smaran Harihar
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to