[Geoserver-users] Geoserver WMS Layer (Over BING maps) shifts when zooming in/out
Hey all, My last post included 2 images but they exceed the size limit so its being held so trying this without images (images would help I know :)) Quick question: I am overlaying a custom WMS polygon layer over Bing maps...Now when I am zoomed in (Level 16 and below) this looks accurate and on the money but as I move out I find my polygon WMS layer shifts north and is offset the Bing background. I have attached 2 images: ZoomOut.png is naturall full UK country coverage and ZoomIn.png is closer in to illustrate this issue. Is there something simple I'm missing? This polygon is being rendered from SQL Server but I am having the same problem from SHP. Any advice on this would be much appreciated - not sure why this is happening? Cheers, Ben -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
[Geoserver-users] wps - external wfs request
text/html; charset=US-ASCII: Unrecognized -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] wps - external wfs request
Hi, I see word inspire somewhere. Could it be possible that data on that server is not simple features but something structured like the inspere schemata tend to be? As far as I know Geoserver can't utilize data if they are some application schema stuff. It would help to see the schema of that FeatureType and perhaps one feature in GML also. -Jukka Rahkonen- Samanta Biasiolli wrote: Hi, I can try to call with a wps request an external wfs. My request is: ?xml version=1.0 encoding=UTF-8?wps:Execute version=1.0.0 service=WPS xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.opengis.net/wps/1.0.0; xmlns:wfs=http://www.opengis.net/wfs; xmlns:wps=http://www.opengis.net/wps/1.0.0; xmlns:ows=http://www.opengis.net/ows/1.1; xmlns:gml=http://www.opengis.net/gml; xmlns:ogc=http://www.opengis.net/ogc; xmlns:wcs=http://www.opengis.net/wcs/1.1.1; xmlns:xlink=http://www.w3.org/1999/xlink; xsi:schemaLocation=http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd; ows:Identifiergs:Bounds/ows:Identifier wps:DataInputs wps:Input ows:Identifierfeatures/ows:Identifier wps:Reference mimeType=application/wfs-collection-1.0 xlink:href=http://sdi.provincia.bz.it/geoserver/inspire/wfs; method=POST wps:Body ![CDATA outputFormat=GML2 xmlns:inspire=http://sdi.provinz.bz.it/inspire; xmlns:wfs=http://www.opengis.net/wfs; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd; ]] bounds but I have this error: Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to net.opengis.wfs.FeatureCollectionType Any suggestion? Thank you very much Samanta SAMANTA BIASIOLLI Laboratorio Sviluppo SW SINERGIS - Sede di Trento T. +39 0461 0461997245 F. +39 0461 997330 [Sinergis]http://www.sinergis.it/ Le informazioni contenute in questo messaggio di posta elettronica sono riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o forma. Qualora Lei non fosse la persona destinataria del presente messaggio, La invitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente comunicazione al mittente. The information included in this e-mail and any attachments are confidential and may also be privileged. If you are not the correct recipient, you are kindly requested to notify the sender immediately, to cancel it and not to disclose the contents to any other person. Die Informationen in dieser E-Mail-Mitteilung sind vertraulich und deren Verbreitung in jeglicher Art oder Form ist untersagt. Sollten Sie diese Nachricht irrt?mlich erhalten haben, ersuchen wir Sie, sofort den Absender dar?ber zu informieren und die Mail zu l?schen. http://www.dedagroup.it -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
[Geoserver-users] Add data (granule) to an imagemosaic+time
Hi list, I've got an imagemosaic constituted of several NDVI geotiffs (using time dimension). It works very well, but I'm stuck at the add new data step. I've tried several ways : curl (http://docs.geoserver.org/2.5.x/en/user/rest/examples/curl.html), gsconfig. Digging in the REST API, I guess it should have been curl -v -u admin:geoserver -XPUT -H Content-type: application/zip --data-binary @dv2011.zip http://pigeo.fr/geoserver-prod/rest/workspaces/pigeo/coveragestores/NDVI/file.imagemosaic (the zip file containing my new geotiff file) Actually, it did add the data in the repository, but didn't update the index. So it's not really added, just copied in the folder. I've even tried with several versions of geoserver (2.4.2, 2.5.2, 2.6.RC1) with no changes. So I guess I'm mistaken somewhere in my process. My data are geotiffs, all the same. I'm running geoserver under tomcat7, java 7 oracle. The mosaic index is stored in a postgis DB. Any help, please ? Do I need to install some extension ? Have a nice day, Jean -- *Jean Pommier -- pi-Geosolutions* Ingénieur, consultant indépendant Tél. : (+33) 6 09 23 21 36 E-mail : j...@pi-geosolutions.fr Web : www.pi-geosolutions.fr -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
[Geoserver-users] Rif: Re: wps - external wfs request
Thank you for the answer, I tried with a not ispire feature type too, but I get the same error. Maybe my request is wrong, can I have an example?Thanks!SAMANTA BIASIOLLI Laboratorio Sviluppo SWSINERGIS - Sede di Trento T. +39 0461 0461997245F. +39 0461 997330 Rahkonen Jukka (Tike) ---11/09/2014 10.05.00---Hi, I see word inspire somewhere. Could it be possible that data on that server is not simple featDa:Rahkonen Jukka (Tike) jukka.rahko...@mmmtike.fiPer:samanta.biasio...@sinergis.it samanta.biasio...@sinergis.it, geoserver-users@lists.sourceforge.net geoserver-users@lists.sourceforge.netData:11/09/2014 10.05Oggetto:Re: [Geoserver-users] wps - external wfs requestHi,I see word inspire somewhere. Could it be possible that data on that server is not simple features but something structured like the inspere schemata tend to be? As far as I know Geoserver can't utilize data if they are some application schema stuff. It would help to see the schema of that FeatureType and perhaps one feature in GML also.-Jukka Rahkonen-Samanta Biasiolli wrote:Hi,I can try to call with a wps request an external wfs.My request is:?xml version=1.0 encoding=UTF-8?wps:Execute version=1.0.0 service=WPS xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://www.opengis.net/wps/1.0.0 xmlns:wfs=http://www.opengis.net/wfs xmlns:wps=http://www.opengis.net/wps/1.0.0 xmlns:ows=http://www.opengis.net/ows/1.1 xmlns:gml=http://www.opengis.net/gml xmlns:ogc=http://www.opengis.net/ogc xmlns:wcs=http://www.opengis.net/wcs/1.1.1 xmlns:xlink=http://www.w3.org/1999/xlink xsi:schemaLocation=http://www.opengis.net/wps/1.0.0http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd ows:Identifiergs:Bounds/ows:Identifier wps:DataInputs wps:Input ows:Identifierfeatures/ows:Identifier wps:Reference mimeType=application/wfs-collection-1.0 xlink:href="">http://sdi.provincia.bz.it/geoserver/inspire/wfs method=POSTwps:Body ![CDATA outputFormat=GML2 xmlns:inspire=http://sdi.provinz.bz.it/inspire xmlns:wfs=http://www.opengis.net/wfs xmlns:ogc=http://www.opengis.net/ogc xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://www.opengis.net/wfshttp://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd ]] bounds but I have this error: Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to net.opengis.wfs.FeatureCollectionType Any suggestion? Thank you very much Samanta SAMANTA BIASIOLLI Laboratorio Sviluppo SW SINERGIS - Sede di Trento T. +39 0461 0461997245 F. +39 0461 997330 Le informazioni contenute in questo messaggio di posta elettronica sono riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o forma. Qualora Lei non fosse la persona destinataria del presente messaggio, La invitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente comunicazione al mittente. The information included in this e-mail and any attachments are confidential and may also be privileged. If you are not the correct recipient, you are kindly requested to notify the sender immediately, to cancel it and not to disclose the contents to any other person. Die Informationen in dieser E-Mail-Mitteilung sind vertraulich und deren Verbreitung in jeglicher Art oder Form ist untersagt. Sollten Sie diese Nachricht irrt?mlich erhalten haben, ersuchen wir Sie, sofort den Absender dar?ber zu informieren und die Mail zu l?schen. http://www.dedagroup.it--Want excitement?Manually upgrade your production database.When you want reliability, choose PerforcePerforce version control. Predictably reliable.http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___Geoserver-users mailing listGeoserver-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/geoserver-users Le informazioni contenute in questo messaggio di posta elettronica sono riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o forma. Qualora Lei non fosse la persona destinataria del presente messaggio, La invitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente comunicazione al mittente. The information included in this e-mail and any attachments are confidential and may also be privileged. If you are not the correct recipient, you are kindly requested to notify the sender immediately, to cancel it and not to disclose the contents to any other person. Die Informationen in dieser E-Mail-Mitteilung sind vertraulich und deren Verbreitung in jeglicher Art oder Form ist untersagt. Sollten Sie diese Nachricht irrtümlich erhalten haben, ersuchen wir Sie, sofort den Absender darüber zu informieren und die Mail zu löschen. http://www.dedagroup.it -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce
Re: [Geoserver-users] wps - external wfs request
Hi, The error means that Geoserver do not recognize data that it gets from the remore server as valid WFS feature collection. It would be best to capture the data coming from the server because error messages etc. would lead to the same result. You can also eliminate the possibility that there is some interoperability issues with that certain server by having a try with some layer from http://demo.opengeo.org/geoserver/wfs. Actually even better is to split the task to smaller pieces: - Send a hand written request to WFS manually from browser or curl, wget etc. - Save data on disk and check if it looks valid. - Pass data on to WPS process from file and see if result is OK. - Now put server to make a WFS request and check if it gets data as in step 2 - And so on. What is important is to test one thing at a time and try to change only one thing for the next step. -Jukka Rahkonen- Samanta Biasiolli wrote: Thank you for the answer, I tried with a not ispire feature type too, but I get the same error. Maybe my request is wrong, can I have an example? Thanks! SAMANTA BIASIOLLI Laboratorio Sviluppo SW SINERGIS - Sede di Trento T. +39 0461 0461997245 F. +39 0461 997330 [Sinergis]http://www.sinergis.it/ [Inactive hide details for Rahkonen Jukka (Tike) ---11/09/2014 10.05.00---Hi, I see word inspire somewhere. Could it be poss]Rahkonen Jukka (Tike) ---11/09/2014 10.05.00---Hi, I see word inspire somewhere. Could it be possible that data on that server is not simple feat Da: Rahkonen Jukka (Tike) jukka.rahko...@mmmtike.fi Per: samanta.biasio...@sinergis.it samanta.biasio...@sinergis.it, geoserver-users@lists.sourceforge.net geoserver-users@lists.sourceforge.net Data: 11/09/2014 10.05 Oggetto: Re: [Geoserver-users] wps - external wfs request Hi, I see word inspire somewhere. Could it be possible that data on that server is not simple features but something structured like the inspere schemata tend to be? As far as I know Geoserver can't utilize data if they are some application schema stuff. It would help to see the schema of that FeatureType and perhaps one feature in GML also. -Jukka Rahkonen- Samanta Biasiolli wrote: Hi, I can try to call with a wps request an external wfs. My request is: ?xml version=1.0 encoding=UTF-8?wps:Execute version=1.0.0 service=WPS xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://www.opengis.net/wps/1.0.0; xmlns:wfs=http://www.opengis.net/wfs; xmlns:wps=http://www.opengis.net/wps/1.0.0; xmlns:ows=http://www.opengis.net/ows/1.1; xmlns:gml=http://www.opengis.net/gml; xmlns:ogc=http://www.opengis.net/ogc; xmlns:wcs=http://www.opengis.net/wcs/1.1.1; xmlns:xlink=http://www.w3.org/1999/xlink; xsi:schemaLocation=http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd; ows:Identifiergs:Bounds/ows:Identifier wps:DataInputs wps:Input ows:Identifierfeatures/ows:Identifier wps:Reference mimeType=application/wfs-collection-1.0 xlink:href=http://sdi.provincia.bz.it/geoserver/inspire/wfs; method=POST wps:Body ![CDATA outputFormat=GML2 xmlns:inspire=http://sdi.provinz.bz.it/inspire; xmlns:wfs=http://www.opengis.net/wfs; xmlns:ogc=http://www.opengis.net/ogc; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd; ]] bounds but I have this error: Caused by: java.lang.ClassCastException: java.util.HashMap cannot be cast to net.opengis.wfs.FeatureCollectionType Any suggestion? Thank you very much Samanta SAMANTA BIASIOLLI Laboratorio Sviluppo SW SINERGIS - Sede di Trento T. +39 0461 0461997245 F. +39 0461 997330 [Sinergis]http://www.sinergis.it/ Le informazioni contenute in questo messaggio di posta elettronica sono riservate e confidenziali e ne e' vietata la diffusione in qualsiasi modo o forma. Qualora Lei non fosse la persona destinataria del presente messaggio, La invitiamo a non diffonderlo e ad eliminarlo, dandone gentilmente comunicazione al mittente. The information included in this e-mail and any attachments are confidential and may also be privileged. If you are not the correct recipient, you are kindly requested to notify the sender immediately, to cancel it and not to disclose the contents to any other person. Die Informationen in dieser E-Mail-Mitteilung sind vertraulich und deren Verbreitung in jeglicher Art oder Form ist untersagt. Sollten Sie diese Nachricht irrt?mlich erhalten haben, ersuchen wir Sie, sofort den Absender dar?ber zu informieren und die Mail zu l?schen. http://www.dedagroup.ithttp://www.dedagroup.it/ -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control.
Re: [Geoserver-users] Add data (granule) to an imagemosaic+time
Hi Jean, if I understand you correctly, you have an existing time enabled image mosaic and want to add new GeoTIFFs to it, yes? As far as I am aware the Geoserver ImageMosaic module does not provide a mechanism to update the granule index when new granules are added to the ImageMosaic source directory. Instead you need to add the granules manually to your granule index in your PostGIS table. You can do this automated through a Script for example. This script would need to extract the respective parameters from the new granules (time dimension from filename, geographical extent from GeoTIFF, path) and write it to a new row in your granule index table (if the extent is the same for all of your granules you could also simply copy over the geometry from a previous granule). Alternatively you would have to recreate the ImageMosaic every time you add new granules to it (which would require deleting the granule index table and deleting the supplementary files that GeoServer creates on ImageMosaic creation before recreating the ImageMosaic). Regards, Max Von: Jean Pommier jean.pomm...@pi-geosolutions.fr Gesendet: Donnerstag, 11. September 2014 08:44 An: geoserver-users@lists.sourceforge.net Betreff: [Geoserver-users] Add data (granule) to an imagemosaic+time Hi list, I've got an imagemosaic constituted of several NDVI geotiffs (using time dimension). It works very well, but I'm stuck at the add new data step. I've tried several ways : curl (http://docs.geoserver.org/2.5.x/en/user/rest/examples/curl.html), gsconfig. Digging in the REST API, I guess it should have been curl -v -u admin:geoserver -XPUT -H Content-type: application/zip --data-binary @dv2011.zip http://pigeo.fr/geoserver-prod/rest/workspaces/pigeo/coveragestores/NDVI/file.imagemosaic (the zip file containing my new geotiff file) Actually, it did add the data in the repository, but didn't update the index. So it's not really added, just copied in the folder. I've even tried with several versions of geoserver (2.4.2, 2.5.2, 2.6.RC1) with no changes. So I guess I'm mistaken somewhere in my process. My data are geotiffs, all the same. I'm running geoserver under tomcat7, java 7 oracle. The mosaic index is stored in a postgis DB. Any help, please ? Do I need to install some extension ? Have a nice day, Jean -- [cid:part1.00040504.08080902@pi-geosolutions.fr] Jean Pommier -- pi-Geosolutions Ingénieur, consultant indépendant Tél. : (+33) 6 09 23 21 36 E-mail : j...@pi-geosolutions.frmailto:j...@pi-geosolutions.fr Web : www.pi-geosolutions.frhttp://www.pi-geosolutions.fr -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] App-schema extension:stored queries for complex features
-Original Message- From: Valentina Sagris [mailto:valentina.sag...@ut.ee] Sent: 11 September 2014 05:59 I wonder is it possible to use wfs2 fes -filter and eventually have storedQueries for app-schema complex feature? Yes, you can see some demo queries by going to the demo requests page at http://ogc.bgs.ac.uk/digmap625k_gsml32_insp_gs, for example. There is a description of how this service was set up at http://data.gov.uk/library/implementing-inspire-web-feature-service-geoserver. I managed to use complex feature in ogc filter ogc:PropertyIsGreaterThan ogc:PropertyNamesarv:contains/sarv:LocalitySummary/sarv:results/ogc: PropertyName ogc:Literal0/ogc:Literal /ogc:PropertyIsGreaterThan But I have problems with wfs2-fes fes:Filter fes:PropertyIsGreaterThan fes:ValueReferencesarv:contains/sarv:LocalitySummary/sarv:results/fe s:ValueReference fes:Literal0/fes:Literal /fes:PropertyIsGreaterThan when I try it in geoserver demos, I have message: java.net.MalformedURLException: no protocol: does it mean that it is constrain on the part of App-Schema extension or just Demos does not support the protocol for wfs2? on the other hand just general FeatureId query in wfs2 works! I can't immediately see any reason for your error but, on the general question of whether you should be able to use FES2 and WFS2 with app-schema the answer is yes. Also adding stored queries seems to work. Maybe looking at the cookbook above and example service will show whether there are any differences with your setup. By the way, which version of GeoServer are you using; our services are currently using v2.4.5. Marcus Sen British Geological Survey Keyworth Nottingham NG12 5GG Web: http://www.bgs.ac.uk This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system. -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Add data (granule) to an imagemosaic+time
Hi Max, Yes, that's what I meant. Are you certain about this 'manually edit the index' stuff ? I don't get it : using REST DELETE command, you can remove a granule, and it is removed from the index too. But when you add a granule, it is not inserted in the index ? Isn't it the point of adding a granule to the mosaic ? Seems weird, doesn't it ? Thanks, Jean Le 11/09/2014 11:33, Max Stephan a écrit : Hi Jean, if I understand you correctly, you have an existing time enabled image mosaic and want to add new GeoTIFFs to it, yes? As far as I am aware the Geoserver ImageMosaic module does not provide a mechanism to update the granule index when new granules are added to the ImageMosaic source directory. Instead you need to add the granules manually to your granule index in your PostGIS table. You can do this automated through a Script for example. This script would need to extract the respective parameters from the new granules (time dimension from filename, geographical extent from GeoTIFF, path) and write it to a new row in your granule index table (if the extent is the same for all of your granules you could also simply copy over the geometry from a previous granule). Alternatively you would have to recreate the ImageMosaic every time you add new granules to it (which would require deleting the granule index table and deleting the supplementary files that GeoServer creates on ImageMosaic creation before recreating the ImageMosaic). Regards, Max *Von:* Jean Pommier jean.pomm...@pi-geosolutions.fr *Gesendet:* Donnerstag, 11. September 2014 08:44 *An:* geoserver-users@lists.sourceforge.net *Betreff:* [Geoserver-users] Add data (granule) to an imagemosaic+time Hi list, I've got an imagemosaic constituted of several NDVI geotiffs (using time dimension). It works very well, but I'm stuck at the add new data step. I've tried several ways : curl (http://docs.geoserver.org/2.5.x/en/user/rest/examples/curl.html), gsconfig. Digging in the REST API, I guess it should have been curl -v -u admin:geoserver -XPUT -H Content-type: application/zip --data-binary @dv2011.zip http://pigeo.fr/geoserver-prod/rest/workspaces/pigeo/coveragestores/NDVI/file.imagemosaic (the zip file containing my new geotiff file) Actually, it did add the data in the repository, but didn't update the index. So it's not really added, just copied in the folder. I've even tried with several versions of geoserver (2.4.2, 2.5.2, 2.6.RC1) with no changes. So I guess I'm mistaken somewhere in my process. My data are geotiffs, all the same. I'm running geoserver under tomcat7, java 7 oracle. The mosaic index is stored in a postgis DB. Any help, please ? Do I need to install some extension ? Have a nice day, Jean -- *Jean Pommier -- pi-Geosolutions* Ingénieur, consultant indépendant Tél. : (+33) 6 09 23 21 36 E-mail : j...@pi-geosolutions.fr Web : www.pi-geosolutions.fr -- *Jean Pommier -- pi-Geosolutions* Ingénieur, consultant indépendant Tél. : (+33) 6 09 23 21 36 E-mail : j...@pi-geosolutions.fr Web : www.pi-geosolutions.fr -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
[Geoserver-users] Geoserver 2.6 RC1 slow WMS
Hello, I am testing out Geoserver 2.6 RC1 (and 2.6 beta). When performance testing (WMS getmap), I find 2.6x to be ~50% slower than 2.5.2. (Or the other way around - 2.5.2 is 100-150 % faster). I get these results reqeusting png, png8 and jpeg. I tried I have native JAI / JAI ImageIO installed, under Server Status: Native JAI true Native JAI ImageIO true) I tried PNGJ based encoder (returns the error below) and ImageIO native encoder. The only thing I can come up with is this error message (wiht PNGJ based encoder): PM it.geosolutions.imageio.plugins.png.PNGWriter writePNG SEVERE: Failed to encode the PNG ar.com.hjg.pngj.PngjOutputException: org.geoserver.ows.ClientStreamAbortedException at ar.com.hjg.pngj.PngHelperInternal.writeBytes(PngHelperInternal.java:196) at ar.com.hjg.pngj.chunks.ChunkRaw.writeChunk(ChunkRaw.java:97) at ar.com.hjg.pngj.PngIDatChunkOutputStream.flushBuffer(PngIDatChunkOutputStream.java:28) at ar.com.hjg.pngj.ProgressiveOutputStream.checkFlushBuffer(ProgressiveOutputStream.java:65) at ar.com.hjg.pngj.ProgressiveOutputStream.write(ProgressiveOutputStream.java:34) at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:253) at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:211) at ar.com.hjg.pngj.PngWriter.filterAndSend(PngWriter.java:245) at ar.com.hjg.pngj.PngWriter.writeRow(PngWriter.java:572) at ar.com.hjg.pngj.PngWriter.writeRow(PngWriter.java:548) at it.geosolutions.imageio.plugins.png.PNGWriter.writePNG(PNGWriter.java:90) at org.geoserver.wms.map.png.PNGJWriter.writePNG(PNGJWriter.java:50) at org.geoserver.wms.map.PNGMapResponse.formatImageOutputStream(PNGMapResponse.java:108) at org.geoserver.wms.map.RenderedImageMapResponse.write(RenderedImageMapResponse.java:122) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:936) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:277) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:70) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:70) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at
[Geoserver-users] Point Geometry in lon/lat columns of non-spatial db
Hi, is it possible to use a db, say Oracle *without* its spatial extension as a Data source in GeoServer, where the Point geometry is simply stored in two separate columns? The columns are simply lon and lat containing floats. That is, can I simply map these lon/lat columns in GeoServer and let GeoServer know that these are my geometry? Best, Jens -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Point Geometry in lon/lat columns of non-spatial db
Jens, Did you need GeoServer for some specific purpose for said X|Y coordinates -like creating a WMS layer? If there is no ‘good’ reason to use GeoServer then said data can simply be accessed via your webcore(read Leaflet or OpenLayer and node.js, as an example). Eric On Sep 11, 2014, at 7:10 AM, Nachtigall, Jens (init) jens.nachtig...@init.de wrote: Hi, is it possible to use a db, say Oracle *without* its spatial extension as a Data source in GeoServer, where the Point geometry is simply stored in two separate columns? The columns are simply “lon” and “lat” containing floats. That is, can I simply map these lon/lat columns in GeoServer and let GeoServer know that these are my geometry? Best, Jens -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Add data (granule) to an imagemosaic+time
Hi Jean, I have this working on GeoServer 2.5.1. Here's what I do to add a granule to my ImageMosaic+time and with a custom domain attribute: 1. Manually copy the granule, eg Granule_005_20140902_20.tif, to folder file:///D:/Data/Imageryfile:///D:\Data\Imagery which is where my ImageMosaic store points to 2. Make an HTTP POST to GeoServer REST API as follows (I'm not using Curl so you will need to adapt my solution but this should hopefully give you the key to getting it to work): a. Method: POST b. URL: http://localhost:geoserver-port/geoserver/rest/workspaces/myworkspace/coveragestores/my-imagemosaic-store/external.imagemosaic?recalculate=nativebbox,latlonbboxhttp://localhost:%3cgeoserver-port%3e/geoserver/rest/workspaces/%3cmyworkspace%3e/coveragestores/%3cmy-imagemosaic-store%3e/external.imagemosaic?recalculate=nativebbox,latlonbbox c. Body (plain/text format): file:///D:/Data/imagery/Granule_005_20140902_20.tiffile:///D:\Data\imagery\Granule_005_20140902_20.tif d. After I make this request the ImageMosaic spatial index is updated in my Postgresql/PostGIS database This technique is captured in the GeoServer REST API documentation at: http://docs.geoserver.org/stable/en/user/rest/api/coveragestores.html If the coverage store is a simple one (e.g. GeoTiff) it will return a 405, if the coverage store is a structured one (e.g., mosaic) it will harvest the specified files into it, which in turn will integrate the files into the store. Harvest meaning is store dependent, for mosaic the new files will be added as new granules of the mosaic, and existing files will get their attribute updated, other stores might have a different behavior. NOTE: The granule does not need to be in the folder that the ImageMosaic points to. In the HTTP request body you can specify a different location and the granule is just reference from that location in the spatial index relative to the folder pointed to by the ImageMosaic. I would also be interested to hear if anybody has been able to add granules to an ImageMosaic by uploading them through the REST API, I was unable to get this to work . Hope that helps, --Steve From: Jean Pommier [mailto:jean.pomm...@pi-geosolutions.fr] Sent: Thursday, September 11, 2014 2:58 AM To: Max Stephan; geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] Add data (granule) to an imagemosaic+time Hi Max, Yes, that's what I meant. Are you certain about this 'manually edit the index' stuff ? I don't get it : using REST DELETE command, you can remove a granule, and it is removed from the index too. But when you add a granule, it is not inserted in the index ? Isn't it the point of adding a granule to the mosaic ? Seems weird, doesn't it ? Thanks, Jean Le 11/09/2014 11:33, Max Stephan a écrit : Hi Jean, if I understand you correctly, you have an existing time enabled image mosaic and want to add new GeoTIFFs to it, yes? As far as I am aware the Geoserver ImageMosaic module does not provide a mechanism to update the granule index when new granules are added to the ImageMosaic source directory. Instead you need to add the granules manually to your granule index in your PostGIS table. You can do this automated through a Script for example. This script would need to extract the respective parameters from the new granules (time dimension from filename, geographical extent from GeoTIFF, path) and write it to a new row in your granule index table (if the extent is the same for all of your granules you could also simply copy over the geometry from a previous granule). Alternatively you would have to recreate the ImageMosaic every time you add new granules to it (which would require deleting the granule index table and deleting the supplementary files that GeoServer creates on ImageMosaic creation before recreating the ImageMosaic). Regards, Max Von: Jean Pommier jean.pomm...@pi-geosolutions.frmailto:jean.pomm...@pi-geosolutions.fr Gesendet: Donnerstag, 11. September 2014 08:44 An: geoserver-users@lists.sourceforge.netmailto:geoserver-users@lists.sourceforge.net Betreff: [Geoserver-users] Add data (granule) to an imagemosaic+time Hi list, I've got an imagemosaic constituted of several NDVI geotiffs (using time dimension). It works very well, but I'm stuck at the add new data step. I've tried several ways : curl (http://docs.geoserver.org/2.5.x/en/user/rest/examples/curl.html), gsconfig. Digging in the REST API, I guess it should have been curl -v -u admin:geoserver -XPUT -H Content-type: application/zip --data-binary @dv2011.zip http://pigeo.fr/geoserver-prod/rest/workspaces/pigeo/coveragestores/NDVI/file.imagemosaic (the zip file containing my new geotiff file) Actually, it did add the data in the repository, but didn't update the index. So it's not really added, just copied in the folder. I've even tried with several versions of geoserver (2.4.2,
Re: [Geoserver-users] Why GDAL plugin not work for me
Hi, Eric and Garey. Thank you so much for your help. It works now. I have to run the geoserver from the tomcat on my machine. If I ran the jetty:run from the geoserser release, the GDAL plugin would not show up. Maybe the geoserver's jetty override the LD_LIBRARY_PATH (There was no log information for GDAL although) or some other reasons? Thanks again. Cindy From: Eric Jarvies [7...@ericjarvies.com] Sent: Wednesday, September 10, 2014 4:40 PM To: geoserver-users@lists.sourceforge.net Cc: Zhang, Cindy Subject: Re: [Geoserver-users] Why GDAL plugin not work for me Cindy, Here are instructions for a server using Java 8… so replace path/folder names with your correct Java version, and make sure to wget the correct imageio and jai versions for your specific platform: cd /usr/lib/jvm/java-8-oracle wget http://download.java.net/media/jai/builds/release/1_1_3/jai-1_1_3-lib-linux-amd64-jdk.bin wget http://download.java.net/media/jai-imageio/builds/release/1.1/jai_imageio-1_1-lib-linux-amd64-jdk.bin sudo sh jai-1_1_3-lib-linux-amd64-jdk.bin sed s/+215/-n+215/ jai_imageio-1_1-lib-linux-amd64-jdk.bin jai_imageio-1_1-lib-linux-amd64-jdk_fixed.bin sudo sh jai_imageio-1_1-lib-linux-amd64-jdk_fixed.bin //can also mv jai_imageio-1_1-lib-linux-amd64-jdk.bin to jai_imageio-1_1-lib-linux-amd64-jdk.zip and unzip it if above .bin fix/repair step does not work for you. sudo rm jai-1_1_3-lib-linux-amd64-jdk.bin sudo rm jai_imageio-1_1-lib-linux-amd64-jdk.bin sudo rm jai_imageio-1_1-lib-linux-amd64-jdk_fixed.bin cd /usr/lib/jvm/java-8-oracle/jre/lib/amd64 wget http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.10/native/gdal/linux/gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz tar -xvzpf gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz rm gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz nano ~/.bashrc # export JAVA_HOME=/usr/lib/jvm/java-8-oracle # make sure you have these too if you need them: export LD_LIBRARY_PATH=/usr/local/lib export GDAL_DATA=/usr/local/share/gdal export GEOS_LIBRARY_PATH=/usr/local/share/gdal source ~/.bashrc sudo ldconfig Then, make sure to download GeoServer plugin(make sure to change to correct version number): cd /path/to/your/geoserver/WEB-INF/lib wget http://superb-dca2.dl.sourceforge.net/project/geoserver/GeoServer/2.5.2/extensions/geoserver-2.5.2-gdal-plugin.zip unzip geoserver-2.5.2-gdal-plugin.zip rm geoserver-2.5.2-gdal-plugin.zip Now restart Tomcat(or Jetty or whatever) and things should work. Eric On Sep 10, 2014, at 1:58 PM, Zhang, Cindy xinfan.zh...@leidos.commailto:xinfan.zh...@leidos.com wrote: Garey, Thank you so much for your help. After checking the library paths you mentioned, I confirmed that I do not have libgeos in my system. So I downloaded the source code, compiled and put into the LD_LIBRARY_PATH. Now gdalinfo works perfect. It displayed all the available formats. However, my geoserver still does not see all the formats, I am using the following commands under my directory /work/geoserver-2.5.2/src/web/app: mvn -DGEOSERVER_DATA_DIR=/terrain/data jetty:run Everything starts good. In Geoserver's admin tool, I select the Data-Stores-Add new Stores, the new formats types still would not show up under Raster Data Sources. I even tried to copy again imageio-ext-gdal-bindings-1.9.2.jar from my download gdal_lib to my geoserver WEB-INF/lib. I also have my environment GDAL_DATA set to the gdal_data directory Any other suggestions that I can try? Thanks again. From: gmi...@berkeley.edumailto:gmi...@berkeley.edu [gmi...@berkeley.edumailto:gmi...@berkeley.edu] on behalf of Garey Mills [gmi...@library.berkeley.edumailto:gmi...@library.berkeley.edu] Sent: Wednesday, September 10, 2014 12:38 PM To: Zhang, Cindy Cc: geoserver-users@lists.sourceforge.netmailto:geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] Why GDAL plugin not work for me Cindy - I'm not an expert, but I have a working GDAL installation on a RHEL6 machine. I just checked and I have libgeos_c.so in my library path. On Linux, the library path is set first the by the environment variable LD_LIBRARY_PATH and then by /etc/ld.so.conf. The directory containing libgeos_c.so(*) has to be named in on or other of those places. You can get the Geos dist at http://trac.osgeo.org/geos/, though I have no idea which version is the correct one. Garey Mills Library Systems Office UC Berkeley On Wed, Sep 10, 2014 at 9:14 AM, Zhang, Cindy xinfan.zh...@leidos.commailto:xinfan.zh...@leidos.com wrote: Hi, I am using GeoServer 2.5.2 and trying to install the GDAL plugin. Following the direction inhttp://docs.geoserver.org/latest/en/user/data/raster/gdal.html, I did not see any extension raster formats showing up. My machine is CentOS release 6.3. My gcc is 4.4.6. I tried to download gdal192-CentOS5.8-gcc4.1.2-x86_64.tar.gz or gdal192-Redhat6.0-gcc4.4.4-x86_64.tar.gz. Both gdalinfo
Re: [Geoserver-users] Add data (granule) to an imagemosaic+time
Hi Steve, Thanks for your answer, it gives me hope. My issue is complementary with yours : 1) I manage to upload the granule using HTTP PUT. In cURL, it would read: curl -v -u admin:geoserver -XPUT -H Content-type: application/zip --data-binary @20130101_DV.tif.zip http://localhost:8081/geoserver26RC1/rest/workspaces/pigeo/coveragestores/ndvi/file.imagemosaic; Note that you have to put your files into a zip archive (saw it in the docs) It does copy the file in my imagemosaic folder. you would have expected it would update the index, but it doesn't 2) It did try the same request as you outlined, but in cURL. It's not much different, and indeed documented. But on my instance, it doesn't do anything at all. I do get a 202, no error, but nothing happens I'll try tomorrow with other sets of data, maybe it my geotiff files having something weird inside (but the initial image mosaic generation is fine, so I would say the files are fine) If you try the PUT request (upload), I'd be interested to know what it does on your instance. Will it recompute the index on the fly ? Next episode tomorrow... Jean Le 11/09/2014 18:30, Stephen Brooke a écrit : Hi Jean, I have this working on GeoServer 2.5.1. Here’s what I do to add a granule to my ImageMosaic+time and with a custom domain attribute: 1.Manually copy the granule, eg Granule_005_20140902_20.tif, to folder file:///D:/Data/Imagery file:///D:%5CData%5CImagery which is where my ImageMosaic store points to 2.Make an HTTP POST to GeoServer REST API as follows (I’m not using Curl so you will need to adapt my solution but this should hopefully give you the key to getting it to work): a.Method: POST b.URL: http://localhost:geoserver-port/geoserver/rest/workspaces/myworkspace/coveragestores/my-imagemosaic-store/external.imagemosaic?recalculate=nativebbox,latlonbbox http://localhost:%3cgeoserver-port%3e/geoserver/rest/workspaces/%3cmyworkspace%3e/coveragestores/%3cmy-imagemosaic-store%3e/external.imagemosaic?recalculate=nativebbox,latlonbbox c.Body (plain/text format): file:///D:/Data/imagery/Granule_005_20140902_20.tif file:///D:%5CData%5Cimagery%5CGranule_005_20140902_20.tif d.After I make this request the ImageMosaic spatial index is updated in my Postgresql/PostGIS database This technique is captured in the GeoServer REST API documentation at: http://docs.geoserver.org/stable/en/user/rest/api/coveragestores.html “If the coverage store is a simple one (e.g. GeoTiff) it will return a 405, if the coverage store is a structured one (e.g., mosaic) it will harvest the specified files into it, which in turn will integrate the files into the store. Harvest meaning is store dependent, for mosaic the new files will be added as new granules of the mosaic, and existing files will get their attribute updated, other stores might have a different behavior.” NOTE: The granule does not need to be in the folder that the ImageMosaic points to. In the HTTP request body you can specify a different location and the granule is just reference from that location in the spatial index relative to the folder pointed to by the ImageMosaic. I would also be interested to hear if anybody has been able to add granules to an ImageMosaic by uploading them through the REST API, I was unable to get this to work . Hope that helps, --Steve *From:*Jean Pommier [mailto:jean.pomm...@pi-geosolutions.fr] *Sent:* Thursday, September 11, 2014 2:58 AM *To:* Max Stephan; geoserver-users@lists.sourceforge.net *Subject:* Re: [Geoserver-users] Add data (granule) to an imagemosaic+time Hi Max, Yes, that's what I meant. Are you certain about this 'manually edit the index' stuff ? I don't get it : using REST DELETE command, you can remove a granule, and it is removed from the index too. But when you add a granule, it is not inserted in the index ? Isn't it the point of adding a granule to the mosaic ? Seems weird, doesn't it ? Thanks, Jean Le 11/09/2014 11:33, Max Stephan a écrit : Hi Jean, if I understand you correctly, you have an existing time enabled image mosaic and want to add new GeoTIFFs to it, yes? As far as I am aware the Geoserver ImageMosaic module does not provide a mechanism to update the granule index when new granules are added to the ImageMosaic source directory. Instead you need to add the granules manually to your granule index in your PostGIS table. You can do this automated through a Script for example. This script would need to extract the respective parameters from the new granules (time dimension from filename, geographical extent from GeoTIFF, path) and write it to a new row in your granule index table (if the extent is the same for all of your granules you could also simply copy over the geometry from a previous granule). Alternatively you would have to recreate the ImageMosaic every time you add new granules to it (which would require deleting the
[Geoserver-users] App-schema extension: schema resolution
hi, I have upgraded my geoserver from 2.5.0 to 2.5.2 using old data directory As result I have problem quering complex feature from Demos page: Could not locate {http://loom-gis.geo.ut.ee/ermas/schemas/sarv}SamplingLocatity in catalog. I have never used catalogoption in any of my mapping files and I do have correct app-schema-cache where should I look to solve this problem? btw, the responce from Demos page is now not a formatted xml, but simply array of values. Did somebody have this before thanks in addvance Valentina -- View this message in context: http://osgeo-org.1560.x6.nabble.com/App-schema-extension-schema-resolution-tp5161367.html Sent from the GeoServer - User mailing list archive at Nabble.com. -- Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191iu=/4140/ostg.clktrk ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Add data (granule) to an imagemosaic+time
Hi Jean, I tried adding a granule the way you did it with PUT and Curl and it replaced my ImageMosaic completely (which is what a PUT request is supposed to do). After deleting and recreating the ImageMosaic I tried POST instead and it worked in the sense that it updated my spatial index for my existing ImageMosaic. So I used your URL with the following alterations: 1. Used POST HTTP method instead of PUT 2. Added query parameter to the end of the URL: ?recalculate=nativebbox,latlonbbox I think I know what is happening in your case. Instead of adding a granule you are effectively replacing the ImageMosaic with the contents of the zip file that you provide and the ImageMosaic takes that zip file's base folder as its new working folder, that is, where the indexer, datastore, and regex property files are expected to be. So try POST instead and it should work for you too. Hope that solves it for you and thanks, you helped me solve my problem too! --Steve From: Jean Pommier [mailto:jean.pomm...@pi-geosolutions.fr] Sent: Thursday, September 11, 2014 11:59 AM To: Stephen Brooke; Max Stephan; geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] Add data (granule) to an imagemosaic+time Hi Steve, Thanks for your answer, it gives me hope. My issue is complementary with yours : 1) I manage to upload the granule using HTTP PUT. In cURL, it would read: curl -v -u admin:geoserver -XPUT -H Content-type: application/zip --data-binary @20130101_DV.tif.zip http://localhost:8081/geoserver26RC1/rest/workspaces/pigeo/coveragestores/ndvi/file.imagemosaic;http://localhost:8081/geoserver26RC1/rest/workspaces/pigeo/coveragestores/ndvi/file.imagemosaic Note that you have to put your files into a zip archive (saw it in the docs) It does copy the file in my imagemosaic folder. you would have expected it would update the index, but it doesn't 2) It did try the same request as you outlined, but in cURL. It's not much different, and indeed documented. But on my instance, it doesn't do anything at all. I do get a 202, no error, but nothing happens I'll try tomorrow with other sets of data, maybe it my geotiff files having something weird inside (but the initial image mosaic generation is fine, so I would say the files are fine) If you try the PUT request (upload), I'd be interested to know what it does on your instance. Will it recompute the index on the fly ? Next episode tomorrow... Jean Le 11/09/2014 18:30, Stephen Brooke a écrit : Hi Jean, I have this working on GeoServer 2.5.1. Here's what I do to add a granule to my ImageMosaic+time and with a custom domain attribute: 1. Manually copy the granule, eg Granule_005_20140902_20.tif, to folder file:///D:/Data/Imageryfile:///D:%5CData%5CImagery which is where my ImageMosaic store points to 2. Make an HTTP POST to GeoServer REST API as follows (I'm not using Curl so you will need to adapt my solution but this should hopefully give you the key to getting it to work): a. Method: POST b. URL: http://localhost:geoserver-port/geoserver/rest/workspaces/myworkspace/coveragestores/my-imagemosaic-store/external.imagemosaic?recalculate=nativebbox,latlonbboxhttp://localhost:%3cgeoserver-port%3e/geoserver/rest/workspaces/%3cmyworkspace%3e/coveragestores/%3cmy-imagemosaic-store%3e/external.imagemosaic?recalculate=nativebbox,latlonbbox c. Body (plain/text format): file:///D:/Data/imagery/Granule_005_20140902_20.tiffile:///D:%5CData%5Cimagery%5CGranule_005_20140902_20.tif d. After I make this request the ImageMosaic spatial index is updated in my Postgresql/PostGIS database This technique is captured in the GeoServer REST API documentation at: http://docs.geoserver.org/stable/en/user/rest/api/coveragestores.html If the coverage store is a simple one (e.g. GeoTiff) it will return a 405, if the coverage store is a structured one (e.g., mosaic) it will harvest the specified files into it, which in turn will integrate the files into the store. Harvest meaning is store dependent, for mosaic the new files will be added as new granules of the mosaic, and existing files will get their attribute updated, other stores might have a different behavior. NOTE: The granule does not need to be in the folder that the ImageMosaic points to. In the HTTP request body you can specify a different location and the granule is just reference from that location in the spatial index relative to the folder pointed to by the ImageMosaic. I would also be interested to hear if anybody has been able to add granules to an ImageMosaic by uploading them through the REST API, I was unable to get this to work . Hope that helps, --Steve From: Jean Pommier [mailto:jean.pomm...@pi-geosolutions.fr] Sent: Thursday, September 11, 2014 2:58 AM To: Max Stephan; geoserver-users@lists.sourceforge.netmailto:geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] Add data (granule) to an imagemosaic+time Hi
Re: [Geoserver-users] Add data (granule) to an imagemosaic+time
Hi again, Nope, apparently that's not it... Good try, however Le 11/09/2014 22:32, Stephen Brooke a écrit : Hi Jean, I tried adding a granule the way you did it with “PUT” and Curl and it replaced my ImageMosaic completely (which is what a PUT request is supposed to do). After deleting and recreating the ImageMosaic I tried “POST” instead and it worked in the sense that it updated my spatial index for my existing ImageMosaic. So I used your URL with the following alterations: 1.Used “POST” HTTP method instead of “PUT” 2.Added query parameter to the end of the URL: ?recalculate=nativebbox,latlonbbox I think I know what is happening in your case. Instead of adding a granule you are effectively replacing the ImageMosaic with the contents of the zip file that you provide and the ImageMosaic takes that zip file’s base folder as its new working folder, that is, where the indexer, datastore, and regex property files are expected to be. So try “POST” instead and it should work for you too. Hope that solves it for you and thanks, you helped me solve my problem too! --Steve *From:*Jean Pommier [mailto:jean.pomm...@pi-geosolutions.fr] *Sent:* Thursday, September 11, 2014 11:59 AM *To:* Stephen Brooke; Max Stephan; geoserver-users@lists.sourceforge.net *Subject:* Re: [Geoserver-users] Add data (granule) to an imagemosaic+time Hi Steve, Thanks for your answer, it gives me hope. My issue is complementary with yours : 1) I manage to upload the granule using HTTP PUT. In cURL, it would read: curl -v -u admin:geoserver -XPUT -H Content-type: application/zip --data-binary @20130101_DV.tif.zip http://localhost:8081/geoserver26RC1/rest/workspaces/pigeo/coveragestores/ndvi/file.imagemosaic; http://localhost:8081/geoserver26RC1/rest/workspaces/pigeo/coveragestores/ndvi/file.imagemosaic Note that you have to put your files into a zip archive (saw it in the docs) It does copy the file in my imagemosaic folder. you would have expected it would update the index, but it doesn't 2) It did try the same request as you outlined, but in cURL. It's not much different, and indeed documented. But on my instance, it doesn't do anything at all. I do get a 202, no error, but nothing happens I'll try tomorrow with other sets of data, maybe it my geotiff files having something weird inside (but the initial image mosaic generation is fine, so I would say the files are fine) If you try the PUT request (upload), I'd be interested to know what it does on your instance. Will it recompute the index on the fly ? Next episode tomorrow... Jean Le 11/09/2014 18:30, Stephen Brooke a écrit : Hi Jean, I have this working on GeoServer 2.5.1. Here’s what I do to add a granule to my ImageMosaic+time and with a custom domain attribute: 1.Manually copy the granule, eg Granule_005_20140902_20.tif, to folder file:///D:/Data/Imagery file:///D:%5CData%5CImagery which is where my ImageMosaic store points to 2.Make an HTTP POST to GeoServer REST API as follows (I’m not using Curl so you will need to adapt my solution but this should hopefully give you the key to getting it to work): a.Method: POST b.URL: http://localhost:geoserver-port/geoserver/rest/workspaces/myworkspace/coveragestores/my-imagemosaic-store/external.imagemosaic?recalculate=nativebbox,latlonbbox http://localhost:%3cgeoserver-port%3e/geoserver/rest/workspaces/%3cmyworkspace%3e/coveragestores/%3cmy-imagemosaic-store%3e/external.imagemosaic?recalculate=nativebbox,latlonbbox c.Body (plain/text format): file:///D:/Data/imagery/Granule_005_20140902_20.tif file:///D:%5CData%5Cimagery%5CGranule_005_20140902_20.tif d.After I make this request the ImageMosaic spatial index is updated in my Postgresql/PostGIS database This technique is captured in the GeoServer REST API documentation at: http://docs.geoserver.org/stable/en/user/rest/api/coveragestores.html “If the coverage store is a simple one (e.g. GeoTiff) it will return a 405, if the coverage store is a structured one (e.g., mosaic) it will harvest the specified files into it, which in turn will integrate the files into the store. Harvest meaning is store dependent, for mosaic the new files will be added as new granules of the mosaic, and existing files will get their attribute updated, other stores might have a different behavior.” NOTE: The granule does not need to be in the folder that the ImageMosaic points to. In the HTTP request body you can specify a different location and the granule is just reference from that location in the spatial index relative to the folder pointed to by the ImageMosaic. I would also be interested to hear if anybody has been able to add granules to an ImageMosaic by uploading them through the REST API, I was unable to get this to work . Hope that helps, --Steve *From:*Jean Pommier
Re: [Geoserver-users] Add data (granule) to an imagemosaic+time
Mmmh, I switched the log level to Geotools Developer Logging level, and I get somehting weird matching with my external.imagemosaic?recalculate=nativebbox,latlonbbox request. I guess I'll have to ask to the devs... It says : 2014-09-11 21:43:09,723 DEBUG [org.geotools.gce.arcgrid] - ArcGridFormatFactory is availaible. 2014-09-11 21:43:09,723 DEBUG [org.geotools.gce.arcgrid] - Creating a new ArcGriFormat. 2014-09-11 21:43:09,724 INFO [org.geoserver.catalog.rest] - PUT file, mimetype: text/plain 2014-09-11 21:43:09,728 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only. 2014-09-11 21:43:09,728 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only. 2014-09-11 21:43:09,728 DEBUG [org.geotools.util] - CRSConverterFactory can be applied from Strings to CRS only. 2014-09-11 21:43:09,728 DEBUG [org.geotools.util] - InterpolationConverterFactory can be applied from Strings to Interpolation only. 2014-09-11 21:43:09,742 DEBUG [org.geotools.jdbc] - CLOSE CONNECTION 2014-09-11 21:43:09,745 INFO [org.geotools.gce.imagemosaic] - Now indexing file 20130101_DV.tif 2014-09-11 21:43:09,748 DEBUG [org.geotools.gce.arcgrid] - ArcGridFormatFactory is availaible. 2014-09-11 21:43:09,750 TRACE [org.geotools.factory] - ENTRY (GridCoverageFactory) 2014-09-11 21:43:09,750 TRACE [org.geotools.factory] - RETURN (GridCoverageFactory): found implementation GridCoverageFactory. 2014-09-11 21:43:09,751 DEBUG [org.geotools.gce.gtopo30] - Unrecognized file (file extension doesn't match) java.io.IOException: Unrecognized file (file extension doesn't match) at org.geotools.gce.gtopo30.GTopo30Reader.init(GTopo30Reader.java:231) at org.geotools.gce.gtopo30.GTopo30Reader.init(GTopo30Reader.java:161) at org.geotools.gce.gtopo30.GTopo30Format.accepts(GTopo30Format.java:177) at org.geotools.coverage.grid.io.GridFormatFinder.findFormats(GridFormatFinder.java:188) at org.geotools.coverage.grid.io.GridFormatFinder.findFormat(GridFormatFinder.java:241) at org.geotools.gce.imagemosaic.ImageMosaicWalker.handleFile(ImageMosaicWalker.java:148) at org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker$MosaicDirectoryWalker.handleFile(ImageMosaicDirectoryWalker.java:98) at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:367) at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:335) at org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker$MosaicDirectoryWalker.init(ImageMosaicDirectoryWalker.java:114) at org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker.run(ImageMosaicDirectoryWalker.java:196) at org.geotools.gce.imagemosaic.ImageMosaicReader$HarvestedResource.harvestCalculation(ImageMosaicReader.java:405) at org.geotools.gce.imagemosaic.ImageMosaicReader$HarvestedResource.access$100(ImageMosaicReader.java:187) at org.geotools.gce.imagemosaic.ImageMosaicReader$HarvestedResource$1.harvest(ImageMosaicReader.java:202) at org.geotools.gce.imagemosaic.ImageMosaicReader.harvest(ImageMosaicReader.java:1250) at org.geoserver.catalog.CoverageDimensionCustomizerReader$CoverageDimensionCustomizerStructuredReader.harvest(CoverageDimensionCustomizerReader.java:121) at org.geoserver.catalog.rest.CoverageStoreFileResource.handlePost(CoverageStoreFileResource.java:89) at org.restlet.Finder.handle(Finder.java:296) at org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:37) at org.restlet.Filter.doHandle(Filter.java:105) at org.restlet.Filter.handle(Filter.java:134) at org.restlet.Router.handle(Router.java:444) at org.geoserver.rest.RESTDispatcher$1.handle(RESTDispatcher.java:204) at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129) at org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:86) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)