[Geoserver-users] Moving layers between workspaces

Hi List,
I was wondering if it is possible to move layers between workspaces. From what I can gather reading around the subject, it I’m gathering maybe not.

I have a lot of layers in a single store that I’d like to send to other workspaces. Do I have to create a new store and assign that second store to a new workspace? Or is there a better way?

I want to move probably 100 layers to new workspaces; they’re all in the same store.

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 Tue, Oct 8, 2013 at 3:12 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi List,
I was wondering if it is possible to move layers between workspaces. From
what I can gather reading around the subject, it I'm gathering maybe not.

I have a lot of layers in a single store that I'd like to send to other
workspaces. Do I have to create a new store and assign that second store to
a new workspace? Or is there a better way?

I want to move probably 100 layers to new workspaces; they're all in the
same store.

As you already figured out, the workspace association is done at the store
level, cannot be done at the layer level.
So yeah, if all the tools you have are the GUI, you'll have to create a new
store and re-create those layers I'm afraid.

If you can do some light programming/scripting though, you could use the
REST config API to change the featuretype reference from
one store to the other. It _should_ work (never tried it personally)

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Hi Andrea,
That’s definitely sub-optimal. Moving stuff around I could probably manage, but it’s the fact we’d need about 3 or four stores which are identical other than the workspace they’re assigned to; as you can imagine that’s quite redundant.
I’m guessing it’d be a significant piece of work to change that?
Cheers,
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 8 October 2013 14:24, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Tue, Oct 8, 2013 at 3:12 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Hi List,
I was wondering if it is possible to move layers between workspaces. From what I can gather reading around the subject, it I’m gathering maybe not.

I have a lot of layers in a single store that I’d like to send to other workspaces. Do I have to create a new store and assign that second store to a new workspace? Or is there a better way?

I want to move probably 100 layers to new workspaces; they’re all in the same store.

As you already figured out, the workspace association is done at the store level, cannot be done at the layer level.
So yeah, if all the tools you have are the GUI, you’ll have to create a new store and re-create those layers I’m afraid.

If you can do some light programming/scripting though, you could use the REST config API to change the featuretype reference from
one store to the other. It should work (never tried it personally)

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Tue, Oct 8, 2013 at 3:30 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi Andrea,
That's definitely sub-optimal. Moving stuff around I could probably
manage, but it's the fact we'd need about 3 or four stores which are
identical other than the workspace they're assigned to; as you can imagine
that's quite redundant.

Production wise, the annoying part is replicating the connection pools,
something you can counter if you setup JNDI based ones (there are some
indications in the GeoServer tutorials), because many stores can use the
same connection pool shared by the web container.

I'm guessing it'd be a significant piece of work to change that?

Very much so I'm afraid, it would take a few hours or work just to make an
estimate.
In the past a concept of "Maps", as collection of layers, was discussed,
that would allow to generate virtual OGC services out
of random collection of layers, however it was never implemented due to
lack of funding.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

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

Thanks for the information. For now I’m going to just leave the setup as is; it’s not important and was just for logical separation of data - 200 layers is quite a lot for one generic workspace.

Cheers,
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 8 October 2013 14:39, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Tue, Oct 8, 2013 at 3:30 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Hi Andrea,
That’s definitely sub-optimal. Moving stuff around I could probably manage, but it’s the fact we’d need about 3 or four stores which are identical other than the workspace they’re assigned to; as you can imagine that’s quite redundant.

Production wise, the annoying part is replicating the connection pools, something you can counter if you setup JNDI based ones (there are some indications in the GeoServer tutorials), because many stores can use the same connection pool shared by the web container.

I’m guessing it’d be a significant piece of work to change that?

Very much so I’m afraid, it would take a few hours or work just to make an estimate.
In the past a concept of “Maps”, as collection of layers, was discussed, that would allow to generate virtual OGC services out
of random collection of layers, however it was never implemented due to lack of funding.

Cheers

Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it