|
From: Justin D. <jde...@op...> - 2009-07-27 22:36:13
|
Hi Fernando,
So I tried this out, and basically here are the steps.
First you create the coverage store. POSTing some xml like this:
<coverageStore>
<name>newCoverageStore</name>
<enabled>true</enabled>
<type>GeoTIFF</type>
<url>file:coverages/some_dir/some_file.tiff</url>
</coverageStore>
Next you need to create the coverage. Now it appears that you have to
specify much of the metadata, including:
srs
nativeCRS
nativeBoundingBox
latLonBoundingBox
dimensions
So POSTing something like:
<coverage>
<name>newCoverage</name>
<srs>EPSG:4326</srs>
<nativeCRS>EPSG:4326</nativeCRS>
<nativeBoundingBox>
<minx>146.49999999999477</minx>
<miny>-44.49999999999785</miny>
<maxx>147.99999999999474</maxx>
<maxy>-42.99999999999787</maxy>
<crs>EPSG:4326</crs>
</nativeBoundingBox>
<latLonBoundingBox>
<minx>146.49999999999477</minx>
<miny>-44.49999999999785</miny>
<maxx>147.99999999999474</maxx>
<maxy>-42.99999999999787</maxy>
<crs>EPSG:4326</crs>
</latLonBoundingBox>
<dimensions>
<coverageDimension>
<name>Red band</name>
<description>GridSampleDimension[0.0,255.0]</description>
<range>
<min>0.0</min>
<max>255.0</max>
</range>
</coverageDimension>
<coverageDimension>
<name>Green band</name>
<description>GridSampleDimension[0.0,255.0]</description>
<range>
<min>0.0</min>
<max>255.0</max>
</range>
</coverageDimension>
<coverageDimension>
<name>Blue band</name>
<description>GridSampleDimension[0.0,255.0]</description>
<range>
<min>0.0</min>
<max>255.0</max>
</range>
</coverageDimension>
</dimensions>
</coverage>
This is pretty verbose. We should file a jira improvement to have the
rest extension auto-configure properties when they are not specified.
Like it goes when you upload via a zip file.
Hope that helps.
-Justin
Fernando Quadro wrote:
>
> Mon, 27 Jul 2009 16:06:47 -0400, Justin Deoliveira <jde...@op...> escreveu:
>
>> Hi Fernando,
>>
>> A couple of questions:
>>
>> Fernando Quadro wrote:
>>> Hey,
>>>
>>> We're trying to add a coverage through the GeoServer API REST, but so far we've been able only to add the CoverageStore.
>> I take it you are not uploading zipped coverages stores, but "manually"
>> creating a coverage store by POSTing to:
>>
>> http://.../rest/workspaces/<ws>/coveragestores
>>
>> ?
>
> Yes
>
>>> The thing is that we already have the image files within the server, but we dont know how to configure them on the geoserver through the REST API. We dont know what is the proper XML format (and wich data to send) that the geoserver expect us to send...
>> When you say the image files are already on the server do you mean they
>> are on the file system of the server running geoserver, or that they are
>> already in the geoserver data directory?
>
> Exactly, we have the files under "<DATA_DIR>/coverages/some_dir", and we'd like to configure the coverage using the files under this directory, is there a way?
>
> Do I need to know every data from the files inside the directory before hand or will the geoserver read them for me (data like srs, gridcoverage, dimensons etc), I mean, should I post all these data within my xml REST package or will the geoserver API read them for me when configuring the coverage?
>
>>> Could you help us out please?
>> Hopefully with some more info I can help. It would also help if you
>> could send me the requests you are issuing to your server. And also any
>> errors that are occurring. Ensure that you have logging set to
>> GEOSERVER_DEVELOPER_LOGGING.
>
> Will do.
>
> Fernando
>
>> -Justin
>>> Best Regards,
>>>
>>> Fernando
>>>
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> Geo...@li...
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>> --
>> Justin Deoliveira
>> OpenGeo - http://opengeo.org
>> Enterprise support for open source geospatial.
>>
>>
>>
>>
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
|