[Geoserver-users] Adding lots of GeoTiffs at once

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They’re not part of a mosaic or pyramid or anything, each is a separate file and needs to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just manually slogging through create store → Publish Layer 39 times?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Mon, Jul 29, 2013 at 5:56 PM, Jonathan Moules
<jonathanmoules@anonymised.com> wrote:

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They're not
part of a mosaic or pyramid or anything, each is a separate file and needs
to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just manually
slogging through create store -> Publish Layer 39 times?

You can use the REST API, as described here:
http://gis.stackexchange.com/questions/6479/programming-geoserver-2-0-2-to-add-a-raster-data-store-and-layer-without-the-ui

regards
p

--
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti

Can’t you use CURL/REST?

Russ


On 29 Jul 2013, at 16:56, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They’re not part of a mosaic or pyramid or anything, each is a separate file and needs to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just manually slogging through create store → Publish Layer 39 times?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


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

Thanks Both,
I’m not sure setting up a script to do rest/curl will be any faster than just zipping through the 39 of them manually.
Useful to know for the future though.

Cheers,
Jonathan

On 29 July 2013 17:13, Russ Hore <russ@anonymised.com.4690…> wrote:

Can’t you use CURL/REST?

Russ


On 29 Jul 2013, at 16:56, Jonathan Moules <jonathanmoules@anonymised.com.> wrote:

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They’re not part of a mosaic or pyramid or anything, each is a separate file and needs to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just manually slogging through create store → Publish Layer 39 times?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Confirmed my supposition. Curl on windows is a royal pain with multi-line stuff (as is required here it seems). I keep getting “< was unexpected at this time”. I’ll just stick to doing it manually. Much less stress.

Jonathan

On 29 July 2013 17:20, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Thanks Both,
I’m not sure setting up a script to do rest/curl will be any faster than just zipping through the 39 of them manually.
Useful to know for the future though.

Cheers,
Jonathan

On 29 July 2013 17:13, Russ Hore <russ@anonymised.com.4690…> wrote:

Can’t you use CURL/REST?

Russ


On 29 Jul 2013, at 16:56, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They’re not part of a mosaic or pyramid or anything, each is a separate file and needs to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just manually slogging through create store → Publish Layer 39 times?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Yeah, we use Python and Requests (http://docs.python-requests.org/en/latest/)
instead of CURL...
You can also try gsconfig.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Adding-lots-of-GeoTiffs-at-once-tp5069402p5069427.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

It's actually not that bad, provided you remember to use double quotes instead of single quotes (double quotes seem to work cross-platform, not sure why the tendency is to use single quotes) and to put it all on one line (as you have surmised). I usually put the payload in a separate file to make the command a bit shorter.

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

On 7/29/2013 9:35 AM, Jonathan Moules wrote:

Confirmed my supposition. Curl on windows is a royal pain with multi-line
stuff (as is required here it seems). I keep getting "< was unexpected at
this time". I'll just stick to doing it manually. Much less stress.

Jonathan

On 29 July 2013 17:20, Jonathan Moules
<jonathanmoules@anonymised.com>wrote:

Thanks Both,
  I'm not sure setting up a script to do rest/curl will be any faster than
just zipping through the 39 of them manually.
Useful to know for the future though.

Cheers,
Jonathan

On 29 July 2013 17:13, Russ Hore <russ@anonymised.com> wrote:

Can't you use CURL/REST?

Russ

-----------------------

On 29 Jul 2013, at 16:56, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They're
not part of a mosaic or pyramid or anything, each is a separate file and
needs to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just
manually slogging through create store -> Publish Layer 39 times?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may
contain sensitive or protectively marked material up to RESTRICTED and
should be handled accordingly. Unless you are the named addressee (or
authorised to receive it for the addressee) you may not copy or use it, or
disclose it to anyone else. If you have received this transmission in error
please notify the sender immediately. All email traffic sent to or from us,
including without limitation all GCSX traffic, may be subject to recording
and/or monitoring in accordance with relevant legislation.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!

http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

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

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk

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

In bash1 and many other unix-like shells, the rules for how things are interpreted inside of single quotes is much less complicated than for double. For URLs I would generally not expect to encounter any of the exceptions, but I think that’s the reason that tutorials generally stick to single-quotes (even if for many authors it turns out to be cargo-culting.)

···

On Mon, Jul 29, 2013 at 3:11 PM, Mike Pumphrey <mike@anonymised.com> wrote:

It’s actually not that bad, provided you remember to use double quotes instead of single quotes (double quotes seem to work cross-platform, not sure why the tendency is to use single quotes) and to put it all on one line (as you have surmised). I usually put the payload in a separate file to make the command a bit shorter.

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

On 7/29/2013 9:35 AM, Jonathan Moules wrote:

Confirmed my supposition. Curl on windows is a royal pain with multi-line
stuff (as is required here it seems). I keep getting “< was unexpected at
this time”. I’ll just stick to doing it manually. Much less stress.

Jonathan

On 29 July 2013 17:20, Jonathan Moules
<jonathanmoules@anonymised.com2…>wrote:

Thanks Both,
I’m not sure setting up a script to do rest/curl will be any faster than
just zipping through the 39 of them manually.
Useful to know for the future though.

Cheers,
Jonathan

On 29 July 2013 17:13, Russ Hore <russ@anonymised.com> wrote:

Can’t you use CURL/REST?

Russ


On 29 Jul 2013, at 16:56, Jonathan Moules <
jonathanmoules@anonymised.com.4942…> wrote:

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They’re
not part of a mosaic or pyramid or anything, each is a separate file and
needs to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just
manually slogging through create store → Publish Layer 39 times?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may
contain sensitive or protectively marked material up to RESTRICTED and
should be handled accordingly. Unless you are the named addressee (or
authorised to receive it for the addressee) you may not copy or use it, or
disclose it to anyone else. If you have received this transmission in error
please notify the sender immediately. All email traffic sent to or from us,
including without limitation all GCSX traffic, may be subject to recording
and/or monitoring in accordance with relevant legislation.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!

http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


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


Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk


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


Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk


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

Heh, quotes in Windows batch files get very annoying. I don’t suppose anyone has a batch file to hand they can copy/paste here? I can probably work from that.

Thanks for all the responses!
Jonathan

On 29 July 2013 20:11, Mike Pumphrey <mike@anonymised.com> wrote:

It’s actually not that bad, provided you remember to use double quotes instead of single quotes (double quotes seem to work cross-platform, not sure why the tendency is to use single quotes) and to put it all on one line (as you have surmised). I usually put the payload in a separate file to make the command a bit shorter.

Thanks,
Mike Pumphrey
OpenGeo - http://opengeo.org

On 7/29/2013 9:35 AM, Jonathan Moules wrote:

Confirmed my supposition. Curl on windows is a royal pain with multi-line
stuff (as is required here it seems). I keep getting “< was unexpected at
this time”. I’ll just stick to doing it manually. Much less stress.

Jonathan

On 29 July 2013 17:20, Jonathan Moules
<jonathanmoules@anonymised.comgov.uk>wrote:

Thanks Both,
I’m not sure setting up a script to do rest/curl will be any faster than
just zipping through the 39 of them manually.
Useful to know for the future though.

Cheers,
Jonathan

On 29 July 2013 17:13, Russ Hore <russ@anonymised.com> wrote:

Can’t you use CURL/REST?

Russ


On 29 Jul 2013, at 16:56, Jonathan Moules <
jonathanmoules@anonymised.comgov.uk> wrote:

Hi List,
I have 39 different GeoTiff layers I want to add to GeoServer. They’re
not part of a mosaic or pyramid or anything, each is a separate file and
needs to be a separate layer.

Is there an easy way to add them all to GeoServer rather than just
manually slogging through create store → Publish Layer 39 times?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may
contain sensitive or protectively marked material up to RESTRICTED and
should be handled accordingly. Unless you are the named addressee (or
authorised to receive it for the addressee) you may not copy or use it, or
disclose it to anyone else. If you have received this transmission in error
please notify the sender immediately. All email traffic sent to or from us,
including without limitation all GCSX traffic, may be subject to recording
and/or monitoring in accordance with relevant legislation.


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!

http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


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


Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.