[Geoserver-users] Batch loader option?

So… I’m adding around 200 layers to GeoServer, and applying styles to each of them. Any chance there is some sort of batch-loading option?

Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com

Developing People through Challenging Projects

Ouch :). Unfortunately no... your best option would be to whip up some sort of script that would create the files and all the directories automatically.

Roger.Andre@anonymised.com wrote:

So.... I'm adding around 200 layers to GeoServer, and applying styles to each of them. Any chance there is some sort of batch-loading option?
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions
CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>
Developing People through Challenging Projects
!DSPAM:4007,47dec8bb241172090977483!

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,47dec8bb241172090977483!

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

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

!DSPAM:4007,47dec8bb241172090977483!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

I can definitely write a Python script to do that, but I didn't think that a style was automatically associated with a layer just by having the file present in the style dir. And if I understand the suggestion correctly, this would take care (potentially) of the SLD's, but what about getting Geoserver to "read" the new PostGIS layers? I'd love to have a config file that defines the layers that should be available, and the location of the SLD that should be applied. Edit the file, restart Tomcat and "Bam!" - new layers read in by Geoserver.
--

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Monday, March 17, 2008 12:43 PM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Batch loader option?

Ouch :). Unfortunately no... your best option would be to whip up some sort of script that would create the files and all the directories automatically.

Roger.Andre@anonymised.com wrote:

So.... I'm adding around 200 layers to GeoServer, and applying styles
to each of them. Any chance there is some sort of batch-loading option?
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects

!DSPAM:4007,47dec8bb241172090977483!

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

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,47dec8bb241172090977483!

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

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

!DSPAM:4007,47dec8bb241172090977483!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Correct, your script would have to create the directory and info.xml for each feature type. In it you could set the default style dynamically. As well as create all the style entries in catalog.xml.

Roger.Andre@anonymised.com wrote:

I can definitely write a Python script to do that, but I didn't think that a style was automatically associated with a layer just by having the file present in the style dir. And if I understand the suggestion correctly, this would take care (potentially) of the SLD's, but what about getting Geoserver to "read" the new PostGIS layers? I'd love to have a config file that defines the layers that should be available, and the location of the SLD that should be applied. Edit the file, restart Tomcat and "Bam!" - new layers read in by Geoserver.
--

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com] Sent: Monday, March 17, 2008 12:43 PM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Batch loader option?

Ouch :). Unfortunately no... your best option would be to whip up some sort of script that would create the files and all the directories automatically.

Roger.Andre@anonymised.com wrote:

So.... I'm adding around 200 layers to GeoServer, and applying styles to each of them. Any chance there is some sort of batch-loading option?
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions
CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>
Developing People through Challenging Projects

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

----------------------------------------------------------------------
--- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,47dec8bb241172090977483!

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

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

!DSPAM:4007,47dec8bb241172090977483!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

!DSPAM:4007,47ded09c255115219720167!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Ahh ok, good to know. I'll probably end up doing that.

Thanks for the info.
--

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Monday, March 17, 2008 1:31 PM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Batch loader option?

Correct, your script would have to create the directory and info.xml for each feature type. In it you could set the default style dynamically. As well as create all the style entries in catalog.xml.

Roger.Andre@anonymised.com wrote:

I can definitely write a Python script to do that, but I didn't think that a style was automatically associated with a layer just by having the file present in the style dir. And if I understand the suggestion correctly, this would take care (potentially) of the SLD's, but what about getting Geoserver to "read" the new PostGIS layers? I'd love to have a config file that defines the layers that should be available, and the location of the SLD that should be applied. Edit the file, restart Tomcat and "Bam!" - new layers read in by Geoserver.
--

-----Original Message-----
From: Justin Deoliveira [mailto:jdeolive@anonymised.com]
Sent: Monday, March 17, 2008 12:43 PM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Batch loader option?

Ouch :). Unfortunately no... your best option would be to whip up some sort of script that would create the files and all the directories automatically.

Roger.Andre@anonymised.com wrote:

So.... I'm adding around 200 layers to GeoServer, and applying styles
to each of them. Any chance there is some sort of batch-loading option?
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions

CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>

Developing People through Challenging Projects

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

---------------------------------------------------------------------
-
--- This SF.net email is sponsored by: Microsoft Defy all challenges.
Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

!DSPAM:4007,47dec8bb241172090977483!

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

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

!DSPAM:4007,47dec8bb241172090977483!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

!DSPAM:4007,47ded09c255115219720167!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Justin Deoliveira wrote:

Ouch :). Unfortunately no... your best option would be to whip up some sort of script that would create the files and all the directories automatically.

May I suggest Ant + xmlTask for editing XML files ?

http://www.oopsconsultancy.com/software/xmltask/
(it is released under APL, in case you wonder).

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

Definitely, Ant tasks are a good option.

I developed a small tool with ant taking a full repository of shapefiles, loading them in PostGis, creating the corresponding features files and linking them to the correct style (it creates metadata for a geonetwork website too).

I think that by using a XSL file with parameters, you should manage to generate your SLD files.

Alexandre Gacon

On Mon, Mar 17, 2008 at 9:36 PM, Luca Morandini <lmorandini@anonymised.com> wrote:

Justin Deoliveira wrote:

Ouch :). Unfortunately no… your best option would be to whip up some
sort of script that would create the files and all the directories
automatically.

May I suggest Ant + xmlTask for editing XML files ?

http://www.oopsconsultancy.com/software/xmltask/
(it is released under APL, in case you wonder).


Luca Morandini
www.lucamorandini.it


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


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

Interesting.

Could someone tell me what is the easiest way to create directories to data_dir based on either the files uploaded into it or on a separate xml.

I have been using Apache Cocoon and wget for automation of wms-raster production. For example I have a large dataset of shp-files of which I'd like to produce rasters based on a separate "xml catalog" (with map file names and coordinates). I can then produce a batchfile with http-requests to run with wget. Each request has a file name defined and as they are run through the cocoon pipeline by wget, the outcome is a group of raster files with proper names. I can assure you this turns out to be handy when you should produce hundres of rasters.

But I'd like automate also the loading of the material into datastore. There has been talking about that in this list earlier, if I recall right, but I still haven't figure out how to do it. I was thinking of using the same concept (cocoon + wget) to do it but I haven't got any idea how to make the directories. Can it be done in Ant+XMLtask? Or are there any simple scripts which would do it? You know, I am not a programmer. Just trying to use these fine software.

- mika -

Alexandre Gacon kirjoitti:

Definitely, Ant tasks are a good option.

I developed a small tool with ant taking a full repository of shapefiles, loading them in PostGis, creating the corresponding features files and linking them to the correct style (it creates metadata for a geonetwork website too).

I think that by using a XSL file with parameters, you should manage to generate your SLD files.

Alexandre Gacon

On Mon, Mar 17, 2008 at 9:36 PM, Luca Morandini <lmorandini@anonymised.com <mailto:lmorandini@anonymised.com>> wrote:

    Justin Deoliveira wrote:
    > Ouch :). Unfortunately no... your best option would be to whip
    up some
    > sort of script that would create the files and all the directories
    > automatically.

    May I suggest Ant + xmlTask for editing XML files ?

    http://www.oopsconsultancy.com/software/xmltask/
    (it is released under APL, in case you wonder).

    --------------------
       Luca Morandini
    www.lucamorandini.it <http://www.lucamorandini.it>
    --------------------

    -------------------------------------------------------------------------
    This SF.net email is sponsored by: Microsoft
    Defy all challenges. Microsoft(R) Visual Studio 2008.
    http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
    _______________________________________________
    Geoserver-users mailing list
    Geoserver-users@lists.sourceforge.net
    <mailto:Geoserver-users@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
------------------------------------------------------------------------

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

Lehtonen, Mika wrote:

But I'd like automate also the loading of the material into datastore. There has been talking about that in this list earlier, if I recall right, but I still haven't figure out how to do it. I was thinking of using the same concept (cocoon + wget) to do it but I haven't got any idea how to make the directories.

Man of little faith ! SourceWritingTransformer to the rescue (see [1]). You can level many criticism to Cocoon, but not having too narrow a scope :wink:

A little example:

1) Fragment of the sitemap:
       <map:match pattern="mkdir.xml">
         <map:generate src="resource/basepage/mkdir.xml"/>
         <map:transform type="tofile">
           <map:parameter name="serializer" value="xml"/>
         </map:transform>
         <map:serialize/>
       </map:match>

2) mkdir.xml:
<?xml version="1.0" encoding="UTF-8"?>
<source:write xmlns:source="http://apache.org/cocoon/source/1.0&quot;&gt;
<source:source>/usr/var/projects/geoserver-cocoon/wsmain/src/main/resources/COB-INF/resource/basepage/mkdir/mkdir.xml</source:source>
   <source:fragment>
     <page>
       <title>Hello World</title>
       <content>
         <p>This is my first paragraph.</p>
       </content>
     </page>
   </source:fragment>
</source:write>

Can it be done in Ant+XMLtask? Or are there any simple scripts which would do it? You know, I am not a programmer. Just trying to use these fine software.

As a general rule, I'd rather use Ant + XMLTask for such tasks (HTTP requests can be made from Ant too, just like wget, see [2]).

Regards,

[1] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/transformation/SourceWritingTransformer.html
[2] http://ant.apache.org/manual/CoreTasks/get.html

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

Luca Morandini ha scritto:

Lehtonen, Mika wrote:

But I'd like automate also the loading of the material into datastore. There has been talking about that in this list earlier, if I recall right, but I still haven't figure out how to do it. I was thinking of using the same concept (cocoon + wget) to do it but I haven't got any idea how to make the directories.

Man of little faith ! SourceWritingTransformer to the rescue (see [1]). You can level many criticism to Cocoon, but not having too narrow a scope :wink:

A little example:

1) Fragment of the sitemap:
       <map:match pattern="mkdir.xml">
         <map:generate src="resource/basepage/mkdir.xml"/>
         <map:transform type="tofile">
           <map:parameter name="serializer" value="xml"/>
         </map:transform>
         <map:serialize/>
       </map:match>

2) mkdir.xml:
<?xml version="1.0" encoding="UTF-8"?>
<source:write xmlns:source="http://apache.org/cocoon/source/1.0&quot;&gt;
<source:source>/usr/var/projects/geoserver-cocoon/wsmain/src/main/resources/COB-INF/resource/basepage/mkdir/mkdir.xml</source:source>
   <source:fragment>
     <page>
       <title>Hello World</title>
       <content>
         <p>This is my first paragraph.</p>
       </content>
     </page>
   </source:fragment>
</source:write>

Can it be done in Ant+XMLtask? Or are there any simple scripts which would do it? You know, I am not a programmer. Just trying to use these fine software.

As a general rule, I'd rather use Ant + XMLTask for such tasks (HTTP requests can be made from Ant too, just like wget, see [2]).

Regards,

[1] http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/transformation/SourceWritingTransformer.html
[2] http://ant.apache.org/manual/CoreTasks/get.html

All of this xml handling makes my head spin. But it seems quite interesting nonetheless. Would it be possible for you all xml lovers
to setup a wiki page for the uneducated user to learn from?
Like a tutorial, say you have a directory full of shapefiles, how
do you automate the loading with these tools?

Cheers
Andrea

Andrea Aime wrote:

All of this xml handling makes my head spin.

If you think XML is verbose then you haven't developed in COBOL :wink:

But it seems quite interesting nonetheless. Would it be possible for you all xml lovers
to setup a wiki page for the uneducated user to learn from?
Like a tutorial, say you have a directory full of shapefiles, how
do you automate the loading with these tools?

No problem: what about a script to copy a bunch of shapefiles into the GEOSERVER_DATADIR and set up data sources and related feature types ?

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

Luca Morandini ha scritto:

Andrea Aime wrote:

All of this xml handling makes my head spin.

If you think XML is verbose then you haven't developed in COBOL :wink:

Aagh, don't even nominate that thing, I'll have nightmares tonight! :slight_smile:

But it seems quite interesting nonetheless. Would it be possible for you all xml lovers
to setup a wiki page for the uneducated user to learn from?
Like a tutorial, say you have a directory full of shapefiles, how
do you automate the loading with these tools?

No problem: what about a script to copy a bunch of shapefiles into the GEOSERVER_DATADIR and set up data sources and related feature types ?

That would be great!
Cheers
Andrea

Yeah,

it would be a great idea to create a little step-by-step HOWTO for data loading.

Take a look at this:

http://www.olympianengine.com/tutorials/geoserver/index.html

reg
mika

Luca Morandini kirjoitti:

Andrea Aime wrote:
  

All of this xml handling makes my head spin.
    
If you think XML is verbose then you haven't developed in COBOL :wink:

But it seems quite interesting nonetheless. Would it be possible for you all xml lovers
to setup a wiki page for the uneducated user to learn from?
Like a tutorial, say you have a directory full of shapefiles, how
do you automate the loading with these tools?
    
No problem: what about a script to copy a bunch of shapefiles into the GEOSERVER_DATADIR and set up data sources and related feature types ?

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  

Lehtonen, Mika wrote:

Take a look at this:

http://www.olympianengine.com/tutorials/geoserver/index.html

I think this approach would be made easier if done with a test record/play framework like Canoo WebTest: first use the FireFox plugin to go through the UI for adding a coverage, then modify the script.

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------

Hi,

I am not sure if you Luca were serious about building that script, but I will be anyway focusing on the problem in the near future. I have over 800 hundred and in the worst case nearly 1300 shp-files that I should load into geoserver some how. I ain't gonna do it by hands! :sunglasses: ... :cry:

Andrea, where from do the the latLonBoundingBox and the nativeBBox come from in an info.xml. Are they read from the shape file while "registering" it? Do I have to dig them out of shapes in my script? Is it that generate button in the 'feature type editor' which generates them?

I was thinking of going through the shp-directory with Cocoon's directory-generator and use a xsl-template to build those files/dirs, but obviously I have to get those coord. information somehow.

reg
mika

P.S. This job should be done by some pro...

Andrea Aime kirjoitti:

Luca Morandini ha scritto:
  

Andrea Aime wrote:
    

All of this xml handling makes my head spin.
      

If you think XML is verbose then you haven't developed in COBOL :wink:
    
Aagh, don't even nominate that thing, I'll have nightmares tonight! :slight_smile:

But it seems quite interesting nonetheless. Would it be possible for you all xml lovers
to setup a wiki page for the uneducated user to learn from?
Like a tutorial, say you have a directory full of shapefiles, how
do you automate the loading with these tools?
      

No problem: what about a script to copy a bunch of shapefiles into the GEOSERVER_DATADIR and set up data sources and related feature types ?
    
That would be great!
Cheers
Andrea

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  

Lehtonen, Mika ha scritto:

Hi,

I am not sure if you Luca were serious about building that script, but I will be anyway focusing on the problem in the near future. I have over 800 hundred and in the worst case nearly 1300 shp-files that I should load into geoserver some how. I ain't gonna do it by hands! :sunglasses: ... :cry:

Andrea, where from do the the latLonBoundingBox and the nativeBBox come from in an info.xml. Are they read from the shape file while "registering" it? Do I have to dig them out of shapes in my script? Is it that generate button in the 'feature type editor' which generates them?

I was thinking of going through the shp-directory with Cocoon's directory-generator and use a xsl-template to build those files/dirs, but obviously I have to get those coord. information somehow.

Hem, it's a bit of a chicken and egg there...
The SRS most of the time cannot be guessed properly from the .prj,
so I hope your shapefiles do have all the same projection.

The coordinates are read from the shapefile as well using the
shapefile datastore, there is nothing you can call now to just
give you the bbox of a random shapefile.

Yet, it seems to me David was working on some REST calls to upload
shapefiles and have geoserver figure out all the details for you?
David?

Cheers
Andrea

Hi,

Perhaps you can use some tools like the ogrinfo function on each of your shapefile (with a script) to retrieve the extent and the projection info and use them to generate the xml files for geoserver.

http://www.gdal.org/ogr/ogrinfo.html

Alexandre

On Wed, Mar 19, 2008 at 1:09 PM, Andrea Aime <aaime@anonymised.com> wrote:

Lehtonen, Mika ha scritto:

Hi,

I am not sure if you Luca were serious about building that script, but I
will be anyway focusing on the problem in the near future. I have over
800 hundred and in the worst case nearly 1300 shp-files that I should
load into geoserver some how. I ain’t gonna do it by hands! :sunglasses::cry:

Andrea, where from do the the latLonBoundingBox and the nativeBBox come
from in an info.xml. Are they read from the shape file while
“registering” it? Do I have to dig them out of shapes in my script? Is
it that generate button in the ‘feature type editor’ which generates them?

I was thinking of going through the shp-directory with Cocoon’s
directory-generator and use a xsl-template to build those files/dirs,
but obviously I have to get those coord. information somehow.

Hem, it’s a bit of a chicken and egg there…
The SRS most of the time cannot be guessed properly from the .prj,
so I hope your shapefiles do have all the same projection.

The coordinates are read from the shapefile as well using the
shapefile datastore, there is nothing you can call now to just
give you the bbox of a random shapefile.

Yet, it seems to me David was working on some REST calls to upload
shapefiles and have geoserver figure out all the details for you?
David?

Cheers
Andrea


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


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

And if you want the extent in Long/Lat, you could create a simple csv file with the extent given by ogrinfo and run ogr2ogr to convert from your original SRS to the WGS84 SRS (I suppose you have the same SRS for all your layers).

Alexandre

On Wed, Mar 19, 2008 at 1:14 PM, Alexandre Gacon <alexandre.gacon@anonymised.com> wrote:

Hi,

Perhaps you can use some tools like the ogrinfo function on each of your shapefile (with a script) to retrieve the extent and the projection info and use them to generate the xml files for geoserver.

http://www.gdal.org/ogr/ogrinfo.html

Alexandre

On Wed, Mar 19, 2008 at 1:09 PM, Andrea Aime <aaime@anonymised.com> wrote:

Lehtonen, Mika ha scritto:

Hi,

I am not sure if you Luca were serious about building that script, but I
will be anyway focusing on the problem in the near future. I have over
800 hundred and in the worst case nearly 1300 shp-files that I should
load into geoserver some how. I ain’t gonna do it by hands! :sunglasses::cry:

Andrea, where from do the the latLonBoundingBox and the nativeBBox come
from in an info.xml. Are they read from the shape file while
“registering” it? Do I have to dig them out of shapes in my script? Is
it that generate button in the ‘feature type editor’ which generates them?

I was thinking of going through the shp-directory with Cocoon’s
directory-generator and use a xsl-template to build those files/dirs,
but obviously I have to get those coord. information somehow.

Hem, it’s a bit of a chicken and egg there…
The SRS most of the time cannot be guessed properly from the .prj,
so I hope your shapefiles do have all the same projection.

The coordinates are read from the shapefile as well using the
shapefile datastore, there is nothing you can call now to just
give you the bbox of a random shapefile.

Yet, it seems to me David was working on some REST calls to upload
shapefiles and have geoserver figure out all the details for you?
David?

Cheers
Andrea


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/


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

Yep,

I think that a batch loader is something that should exist, but on the other hand, there's got to be limits what it does; like uniform source data, maybe styles and so on. If you have hundred of totally different files, are you really doing something reasonable?

I would see this thing (in my dreams) as directory, where you put your shapes and they are sucked into the datastore with proper and correct projections, styles and so on. Maybe you could do some pre-setup of what to do with the files or create different setups in different containers. I'll keep day-dreaming. :-!

mika

Andrea Aime kirjoitti:

Lehtonen, Mika ha scritto:

Hi,

I am not sure if you Luca were serious about building that script, but I will be anyway focusing on the problem in the near future. I have over 800 hundred and in the worst case nearly 1300 shp-files that I should load into geoserver some how. I ain't gonna do it by hands! :sunglasses: ... :cry:

Andrea, where from do the the latLonBoundingBox and the nativeBBox come from in an info.xml. Are they read from the shape file while "registering" it? Do I have to dig them out of shapes in my script? Is it that generate button in the 'feature type editor' which generates them?

I was thinking of going through the shp-directory with Cocoon's directory-generator and use a xsl-template to build those files/dirs, but obviously I have to get those coord. information somehow.

Hem, it's a bit of a chicken and egg there...
The SRS most of the time cannot be guessed properly from the .prj,
so I hope your shapefiles do have all the same projection.

The coordinates are read from the shapefile as well using the
shapefile datastore, there is nothing you can call now to just
give you the bbox of a random shapefile.

Yet, it seems to me David was working on some REST calls to upload
shapefiles and have geoserver figure out all the details for you?
David?

Cheers
Andrea

Thanks,

I have to check that out.

The problem is that I have ideas, but don't know how to make them true. I can't handle more than couple of moving parts at a time. So I know something about Cocoon, Geoserver and gdal. That's already one too much! Keep it simple!

But I do like gdal. There is something I haven't experienced since Image Alhemy 15 years ago. Simple things are done simple and very fast. Beautiful design! It's like Alchemy with geo-options.

cheers,
mika

Alexandre Gacon kirjoitti:

And if you want the extent in Long/Lat, you could create a simple csv file with the extent given by ogrinfo and run ogr2ogr to convert from your original SRS to the WGS84 SRS (I suppose you have the same SRS for all your layers).

Alexandre

On Wed, Mar 19, 2008 at 1:14 PM, Alexandre Gacon <alexandre.gacon@anonymised.com <mailto:alexandre.gacon@anonymised.com>> wrote:

    Hi,

    Perhaps you can use some tools like the ogrinfo function on each
    of your shapefile (with a script) to retrieve the extent and the
    projection info and use them to generate the xml files for geoserver.

    http://www.gdal.org/ogr/ogrinfo.html

    Alexandre

    On Wed, Mar 19, 2008 at 1:09 PM, Andrea Aime <aaime@anonymised.com
    <mailto:aaime@anonymised.com>> wrote:

        Lehtonen, Mika ha scritto:
        > Hi,
        >
        > I am not sure if you Luca were serious about building that
        script, but I
        > will be anyway focusing on the problem in the near future. I
        have over
        > 800 hundred and in the worst case nearly 1300 shp-files that
        I should
        > load into geoserver some how. I ain't gonna do it by hands!
        8-) ... :cry:
        >
        > Andrea, where from do the the latLonBoundingBox and the
        nativeBBox come
        > from in an info.xml. Are they read from the shape file while
        > "registering" it? Do I have to dig them out of shapes in my
        script? Is
        > it that generate button in the 'feature type editor' which
        generates them?
        >
        > I was thinking of going through the shp-directory with Cocoon's
        > directory-generator and use a xsl-template to build those
        files/dirs,
        > but obviously I have to get those coord. information somehow.

        Hem, it's a bit of a chicken and egg there...
        The SRS most of the time cannot be guessed properly from the .prj,
        so I hope your shapefiles do have all the same projection.

        The coordinates are read from the shapefile as well using the
        shapefile datastore, there is nothing you can call now to just
        give you the bbox of a random shapefile.

        Yet, it seems to me David was working on some REST calls to upload
        shapefiles and have geoserver figure out all the details for you?
        David?

        Cheers
        Andrea

        -------------------------------------------------------------------------
        This SF.net email is sponsored by: Microsoft
        Defy all challenges. Microsoft(R) Visual Studio 2008.
        http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
        _______________________________________________
        Geoserver-users mailing list
        Geoserver-users@lists.sourceforge.net
        <mailto:Geoserver-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users