Hello All, I am trying to use the REST API to dynamically configure an imagemosaic layer from GeoTIFF images, but without success. I have zipped up the .shp, .shx, .dbf and .prj files of the index shapefile and the properties file and have tried issuing a PUT request, as follows:
$.ajax({ type: "PUT", url: proxyurl + "http://localhost:8080/geoserver/rest/workspaces/jflow/coveragestores/test1/file.imagemosaic", data: "test1.zip, contentType: "application/zip", success: function(resp) { alert('in success'); }, complete: function(xReq,txtStatus) { alert('in complete: xReq.status=' + xReq.status + ' txtstatus=' + txtStatus + '; responseText= ' + xReq.responseText); if (xReq.responseText.indexOf("201") != -1) { alert('Completed make ImageMosaic'); } } }); GeoServer gets as far as making a coveragestore for test1 but the url is defined as "file:data/test1/test1.imagemosaic" which generates an error in the logs (java.lang.IllegalArgumentException: /C:/Program%20Files/GeoServer%202.0.2/data_dir/data/test1/test1.imagemosaic is not one of the files types that is known to be associated with a shapefile). I have read the thread (http://old.nabble.com/Reload-Mosaic-CoverageStore-Coverage-after-shp-properties-file-has-been-modified-td23928766.html) so it seems it is possible to do but I must be doing something wrong. My questions are: * Do I just need the one PUT request or should I issue a POST request first to create the coverageStore (and possibly a second to amend the coverage properties)? * Should the .zip file be placed in the folder where the .tif files are located? * How does the file.imagemosaic request tell GeoServer where the images are located? Any help much appreciated, thanks, Anne Anne Brookes Senior Analyst - GIS and System Development http://www.jbaconsulting.co.uk/ JBA Consulting South Barn Broughton Hall Skipton North Yorkshire BD23 3AE United Kingdom http://www.jbaconsulting.co.uk/?q=nce-winner-2010 t: +44 (0)1756 799919 | f: +44 (0)1756 799449 JBA is a Carbon Neutral Company. Please don't print this e-mail unless you really need to. This email is covered by JBA Consulting's http://www.jbaconsulting.co.uk/emaildisclaimer.
<<image/gif>>
<<image/gif>>
------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users