Hi, Luca Morandini wrote: > On 23/10/09 10:36, du pre jannot wrote: >> I found another synthaxe: >> >> http://localhost:8081/geoserver/rest/workspaces/namespaceName/coveragestores/coverageStoreName/file.geotiff >> >> that put the right file in the right folder in /data/LayerName but >> doesn’t create the configuration files associated with the coverage. >> >> Could you please explain how RestApi works in this case . > > You have to issue two requests: the first creating the coveragestore by > posting > the image, the second creating the coverage based on said coveragestore.
This is not exactly true. You can do it with one request, but you need to use file.geotiff if you are going to send the file in the body of the request, and you should use url.geotiff, if the file is located somewhere external. url.geotiff is not that well tested. So I think what probably happened is you tried with url.geotiff, there was an error, and then there was a conflict when trying to use file.geotiff. So what I suggest is you remove the coverage store configuration, remove the uploaded file, and try again with a clean configuration and data directory. > > >> I have another question: >> >> When I try to upload a big file, the jvm returns an out of memory >> exception. Is there a limited data size to post by restApi? The memory is constrained by the memory available to the java runtime. So i suggest increasing the amount of memory given to the jvm. That said the code should stream the file but there could be issues with the entire file being dragged into memory. I will have to look into this. > > I cannot help you on this. > > >> How is it possible to update a layer or a lyergroup for example via rest >> with method PUT but without writing all the xml code into the >> httpUrlConnection outputStream. > > As far as I know, only the updated XML element(s) should be inserted in the > request: for instance, to assign a default style to a layer you have to > provide > only the defaultStyle lement: > curl -u admin:geoserver -XPUT -H 'Content-type: text/xml' \ > -d '<layer><defaultStyle><name>roads_style</name></defaultStyle></layer>' \ > http://localhost:8080/geoserver/rest/layers/acme:roads This is correct. Good explanation. > > > Regards, > > P.S. > This kind of questions are better asked to the user list. > > -------------------- > Luca Morandini > www.lucamorandini.it > -------------------- > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Geoserver-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geoserver-devel -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
