Re: [Geoserver-users] bulk geotiff import

2016-01-13 Thread Peter Kovac

Hi Alex,

try this if you have the file on your local computer:

curl -u "user:password" -XPUT -H 'Content-type: image/tiff' \
--data-binary @"$LOCAL_GEOTIFF"\
"http://$HOSTNAME:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/$STORE_NAME/file.geotiff

where variables are the following:
$LOCAL_GEOTIFF - path to the file on your local computer
$HOSTNAME, $PORT - obviously GeoServer instance hostname and port
$WORKSPACE - workspace name
$STORE_NAME - name of the datastore that will be created for your GeoTIFF

If the file is already on the server where the GeoServer runs (and the 
file is readable by the GeoServer process), try it like this


REMOTE_GEOTIFF="file:///path/to/your/remote/geotiff.tiff"
curl -w "%{http_code}" -u "admin:Merc4tr99" -XPUT -H 'Content-type: 
text/plain' \

-d "$REMOTE_GEOTIFF"\
"http://$HOSTNAME:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/$STORE_NAME/external.geotiff;

I think your confusion stems from using incorrect documentation: you 
have raster data, so you should read "Coverage stores" section of the 
manual: 
http://docs.geoserver.org/stable/en/user/rest/api/coveragestores.html


Data stores are for vector data (citing 
http://docs.geoserver.org/stable/en/user/rest/api/datastores.html ):
A data store contains vector format spatial data. It can be a file 
(such as a shapefile), a database (such as PostGIS), or a server (such 
as a /remote Web Feature Service/ 
).





On 12. 1. 2016 18:25, Alex O'Ree wrote:

HTTP PUT to

http://localhost:8080/geoserver/rest/workspaces/myworkspace/datastores/test/external.shp
with the content text/plain
file://data_dir/maps/xyz.tiff

fails with "unable to configure datastore, bad parameters. I'm
assuming this is from the .shp extension.
Changing the extension of the put url to .tiff I get

unsupported format: tiff

I've tried with a few other variants.

It looks like REST API creation of datastores is limited to shape
files. Is that correct?



On Thu, Jan 7, 2016 at 12:59 PM, Alex O'Ree  wrote:

Jody, et al

I'm having some issues get the geotiffs imported via the REST API. I
can import from the web app without any issues. I think I may either
be misinterpreting the documentation and/or the docs may be slightly
inaccurate.

First a bit more info for my setup. v 2.8.RC1
All geotiff files are located in data_dir/maps

I have a workspace called "maps"

I've tried a number of different combinations
HTTP verb: POST
URL http://localhost:8080/geoserver/rest/workspaces/maps/datastores.json
Content-type application/json
Body contents
{
Location: "file:///data_dir/maps/MyGeoTiff.tiff"
}

I'm getting an 500 internal server error. The server logs say, cannot
resolve class exception "Location".

I'm not sure what "right" looks like here. Any pointers to examples?



On Wed, Jan 6, 2016 at 3:57 PM, Alex O'Ree  wrote:

Found it here, http://docs.geoserver.org/stable/en/user/rest/api/datastores.html

thanks for the pointer!

On Wed, Jan 6, 2016 at 12:54 PM, Alex O'Ree  wrote:

Fantastic, can you point me towards the documentation or any where
with more info?

On Wed, Jan 6, 2016 at 12:36 PM, Jody Garnett  wrote:

The REST API can be used to load and configure raster content. The importer
can also be pointed at a directory of spatial files and do a bulk import ...
and the importer is also available via a REST API :)

--
Jody Garnett

On 6 January 2016 at 09:24, Alex O'Ree  wrote:

I have a large collection of geotiff files, is there a process to
getting them all bulk imported into geoserver? Any kind of script or
command line interface I can use? Perhaps a rest api?


--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


--
Peter Kovac
IMS Programmer
MicroStep-MIS
peter.ko...@microstep-mis.sk

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and 

Re: [Geoserver-users] bulk geotiff import

2016-01-13 Thread Alex O'Ree
It worked! Thanks so much!
On Jan 13, 2016 2:58 AM, "Peter Kovac"  wrote:

> Hi Alex,
>
> try this if you have the file on your local computer:
>
> curl -u "user:password" -XPUT -H 'Content-type: image/tiff' \
> --data-binary @"$LOCAL_GEOTIFF"\
> "http://
> $HOSTNAME:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/$STORE_NAME/file.geotiff
>
> where variables are the following:
> $LOCAL_GEOTIFF - path to the file on your local computer
> $HOSTNAME, $PORT - obviously GeoServer instance hostname and port
> $WORKSPACE - workspace name
> $STORE_NAME - name of the datastore that will be created for your GeoTIFF
>
> If the file is already on the server where the GeoServer runs (and the
> file is readable by the GeoServer process), try it like this
>
> REMOTE_GEOTIFF="file:///path/to/your/remote/geotiff.tiff"
> curl -w "%{http_code}" -u "admin:Merc4tr99" -XPUT -H 'Content-type:
> text/plain' \
> -d "$REMOTE_GEOTIFF"\
> "http://
> $HOSTNAME:$PORT/geoserver/rest/workspaces/$WORKSPACE/coveragestores/$STORE_NAME/external.geotiff"
>
> I think your confusion stems from using incorrect documentation: you have
> raster data, so you should read "Coverage stores" section of the manual:
> http://docs.geoserver.org/stable/en/user/rest/api/coveragestores.html
>
> Data stores are for vector data (citing
> http://docs.geoserver.org/stable/en/user/rest/api/datastores.html ):
>
> A data store contains vector format spatial data. It can be a file (such
> as a shapefile), a database (such as PostGIS), or a server (such as a *remote
> Web Feature Service*
> 
> ).
>
>
>
>
>
> On 12. 1. 2016 18:25, Alex O'Ree wrote:
>
> HTTP PUT to
> http://localhost:8080/geoserver/rest/workspaces/myworkspace/datastores/test/external.shp
> with the content text/plainfile://data_dir/maps/xyz.tiff
>
> fails with "unable to configure datastore, bad parameters. I'm
> assuming this is from the .shp extension.
> Changing the extension of the put url to .tiff I get
>
> unsupported format: tiff
>
> I've tried with a few other variants.
>
> It looks like REST API creation of datastores is limited to shape
> files. Is that correct?
>
>
>
> On Thu, Jan 7, 2016 at 12:59 PM, Alex O'Ree  
>  wrote:
>
> Jody, et al
>
> I'm having some issues get the geotiffs imported via the REST API. I
> can import from the web app without any issues. I think I may either
> be misinterpreting the documentation and/or the docs may be slightly
> inaccurate.
>
> First a bit more info for my setup. v 2.8.RC1
> All geotiff files are located in data_dir/maps
>
> I have a workspace called "maps"
>
> I've tried a number of different combinations
> HTTP verb: POST
> URL http://localhost:8080/geoserver/rest/workspaces/maps/datastores.json
> Content-type application/json
> Body contents
> {
> Location: "file:///data_dir/maps/MyGeoTiff.tiff"
> }
>
> I'm getting an 500 internal server error. The server logs say, cannot
> resolve class exception "Location".
>
> I'm not sure what "right" looks like here. Any pointers to examples?
>
>
>
> On Wed, Jan 6, 2016 at 3:57 PM, Alex O'Ree  
>  wrote:
>
> Found it here, 
> http://docs.geoserver.org/stable/en/user/rest/api/datastores.html
>
> thanks for the pointer!
>
> On Wed, Jan 6, 2016 at 12:54 PM, Alex O'Ree  
>  wrote:
>
> Fantastic, can you point me towards the documentation or any where
> with more info?
>
> On Wed, Jan 6, 2016 at 12:36 PM, Jody Garnett  
>  wrote:
>
> The REST API can be used to load and configure raster content. The importer
> can also be pointed at a directory of spatial files and do a bulk import ...
> and the importer is also available via a REST API :)
>
> --
> Jody Garnett
>
> On 6 January 2016 at 09:24, Alex O'Ree  
>  wrote:
>
>
> I have a large collection of geotiff files, is there a process to
> getting them all bulk imported into geoserver? Any kind of script or
> command line interface I can use? Perhaps a rest api?
>
>
> --
> ___
> Geoserver-users mailing 
> listGeoserver-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup 
> Now!http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
> 

Re: [Geoserver-users] bulk geotiff import

2016-01-12 Thread Alex O'Ree
HTTP PUT to

http://localhost:8080/geoserver/rest/workspaces/myworkspace/datastores/test/external.shp
with the content text/plain
file://data_dir/maps/xyz.tiff

fails with "unable to configure datastore, bad parameters. I'm
assuming this is from the .shp extension.
Changing the extension of the put url to .tiff I get

unsupported format: tiff

I've tried with a few other variants.

It looks like REST API creation of datastores is limited to shape
files. Is that correct?



On Thu, Jan 7, 2016 at 12:59 PM, Alex O'Ree  wrote:
> Jody, et al
>
> I'm having some issues get the geotiffs imported via the REST API. I
> can import from the web app without any issues. I think I may either
> be misinterpreting the documentation and/or the docs may be slightly
> inaccurate.
>
> First a bit more info for my setup. v 2.8.RC1
> All geotiff files are located in data_dir/maps
>
> I have a workspace called "maps"
>
> I've tried a number of different combinations
> HTTP verb: POST
> URL http://localhost:8080/geoserver/rest/workspaces/maps/datastores.json
> Content-type application/json
> Body contents
> {
> Location: "file:///data_dir/maps/MyGeoTiff.tiff"
> }
>
> I'm getting an 500 internal server error. The server logs say, cannot
> resolve class exception "Location".
>
> I'm not sure what "right" looks like here. Any pointers to examples?
>
>
>
> On Wed, Jan 6, 2016 at 3:57 PM, Alex O'Ree  wrote:
>> Found it here, 
>> http://docs.geoserver.org/stable/en/user/rest/api/datastores.html
>>
>> thanks for the pointer!
>>
>> On Wed, Jan 6, 2016 at 12:54 PM, Alex O'Ree  wrote:
>>> Fantastic, can you point me towards the documentation or any where
>>> with more info?
>>>
>>> On Wed, Jan 6, 2016 at 12:36 PM, Jody Garnett  
>>> wrote:
 The REST API can be used to load and configure raster content. The importer
 can also be pointed at a directory of spatial files and do a bulk import 
 ...
 and the importer is also available via a REST API :)

 --
 Jody Garnett

 On 6 January 2016 at 09:24, Alex O'Ree  wrote:
>
> I have a large collection of geotiff files, is there a process to
> getting them all bulk imported into geoserver? Any kind of script or
> command line interface I can use? Perhaps a rest api?
>
>
> --
> ___
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] bulk geotiff import

2016-01-06 Thread Alex O'Ree
Fantastic, can you point me towards the documentation or any where
with more info?

On Wed, Jan 6, 2016 at 12:36 PM, Jody Garnett  wrote:
> The REST API can be used to load and configure raster content. The importer
> can also be pointed at a directory of spatial files and do a bulk import ...
> and the importer is also available via a REST API :)
>
> --
> Jody Garnett
>
> On 6 January 2016 at 09:24, Alex O'Ree  wrote:
>>
>> I have a large collection of geotiff files, is there a process to
>> getting them all bulk imported into geoserver? Any kind of script or
>> command line interface I can use? Perhaps a rest api?
>>
>>
>> --
>> ___
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] bulk geotiff import

2016-01-06 Thread Jody Garnett
The REST API can be used to load and configure raster content. The importer
can also be pointed at a directory of spatial files and do a bulk import
... and the importer is also available via a REST API :)

--
Jody Garnett

On 6 January 2016 at 09:24, Alex O'Ree  wrote:

> I have a large collection of geotiff files, is there a process to
> getting them all bulk imported into geoserver? Any kind of script or
> command line interface I can use? Perhaps a rest api?
>
>
> --
> ___
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] bulk geotiff import

2016-01-06 Thread Alex O'Ree
I have a large collection of geotiff files, is there a process to
getting them all bulk imported into geoserver? Any kind of script or
command line interface I can use? Perhaps a rest api?

--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] bulk geotiff import

2016-01-06 Thread Alex O'Ree
Found it here, http://docs.geoserver.org/stable/en/user/rest/api/datastores.html

thanks for the pointer!

On Wed, Jan 6, 2016 at 12:54 PM, Alex O'Ree  wrote:
> Fantastic, can you point me towards the documentation or any where
> with more info?
>
> On Wed, Jan 6, 2016 at 12:36 PM, Jody Garnett  wrote:
>> The REST API can be used to load and configure raster content. The importer
>> can also be pointed at a directory of spatial files and do a bulk import ...
>> and the importer is also available via a REST API :)
>>
>> --
>> Jody Garnett
>>
>> On 6 January 2016 at 09:24, Alex O'Ree  wrote:
>>>
>>> I have a large collection of geotiff files, is there a process to
>>> getting them all bulk imported into geoserver? Any kind of script or
>>> command line interface I can use? Perhaps a rest api?
>>>
>>>
>>> --
>>> ___
>>> Geoserver-users mailing list
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>

--
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users