Hi list,
I will explain the process I followed to be clear what I did and did not:
I am uploading a shapefile in .zip format to GeoServer. This shapefile is a
point geometry file with EPSG:3857.
For the process I am using curl command like this:
curl -v -s -S -u admin:pwd -XPUT -H "Content-type: application/zip"
--data-binary @"c:\data.zip"
http://ip:8080/geoserver/rest/workspaces/field_id_test_sample_processor/datastores/job_id_sample_processor_source/file.shp?
Everything go smoothly (any warn from GeoServer) but when I go to the layer
preview and click on the new generated layer I get this:
<http://osgeo-org.1560.x6.nabble.com/file/n5295711/pic.png>
In the browser is displayed:
http://ip:8080/geoserver/web/null&format=application/openlayers
Then, checking the log I found:
2016-11-14 16:57:45,907 INFO [web.demo] - Could not set figure out
automatically a good preview link for
field_id_test_sample_processor:job_id_sample_processor_source
java.lang.NullPointerException
at
org.geoserver.wms.DefaultWebMapService.guessCommonSRS(DefaultWebMapService.java:671)
at
org.geoserver.wms.DefaultWebMapService.autoSetBoundsAndSize(DefaultWebMapService.java:505)
at org.geoserver.web.demo.PreviewLayer.getRequest(PreviewLayer.java:153)
at org.geoserver.web.demo.PreviewLayer.getWmsLink(PreviewLayer.java:201)
at
org.geoserver.web.demo.MapPreviewPage$1.getComponentForProperty(MapPreviewPage.java:85)
at
org.geoserver.web.wicket.GeoServerTablePanel$4.populateItem(GeoServerTablePanel.java:211)
at
org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:562)
I have tried:
Go to server: status/reload.
Restart GeoServer.
Add WKT EPSG:3857 code to epsgproperties file.
Is something that just happen when the shapefile is in EPSG:3857. Everything
works when uploading the very same shapefile in EPSG:4326 (this one is not
in GeoServer anymore).
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/OL-layer-preview-error-for-shapefile-tp5295711.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hi Alberto,
that’s pretty weird… but it’s also uncommon to have data in a projection that only makes
sense for visualization (due to its very high deformation).
I would open a ticket in the bug tracker, adding a sample shapefile and the curl request to make that happen.
Cheers
Andrea
···
On Mon, Nov 14, 2016 at 6:40 PM, Alberto CD <alberto.callejas@anonymised.com> wrote:
Hi list,
I will explain the process I followed to be clear what I did and did not:
I am uploading a shapefile in .zip format to GeoServer. This shapefile is a
point geometry file with EPSG:3857.
For the process I am using curl command like this:
curl -v -s -S -u admin:pwd -XPUT -H “Content-type: application/zip”
–data-binary @“c:\data.zip”
http://ip:8080/geoserver/rest/workspaces/field_id_test_sample_processor/datastores/job_id_sample_processor_source/file.shp?
Everything go smoothly (any warn from GeoServer) but when I go to the layer
preview and click on the new generated layer I get this:
<http://osgeo-org.1560.x6.nabble.com/file/n5295711/pic.png>
In the browser is displayed:
http://ip:8080/geoserver/web/null&format=application/openlayers
Then, checking the log I found:
2016-11-14 16:57:45,907 INFO [web.demo] - Could not set figure out
automatically a good preview link for
field_id_test_sample_processor:job_id_sample_processor_source
java.lang.NullPointerException
at
org.geoserver.wms.DefaultWebMapService.guessCommonSRS(DefaultWebMapService.java:671)
at
org.geoserver.wms.DefaultWebMapService.autoSetBoundsAndSize(DefaultWebMapService.java:505)
at org.geoserver.web.demo.PreviewLayer.getRequest(PreviewLayer.java:153)
at org.geoserver.web.demo.PreviewLayer.getWmsLink(PreviewLayer.java:201)
at
org.geoserver.web.demo.MapPreviewPage$1.getComponentForProperty(MapPreviewPage.java:85)
at
org.geoserver.web.wicket.GeoServerTablePanel$4.populateItem(GeoServerTablePanel.java:211)
at
org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:562)
I have tried:
Go to server: status/reload.
Restart GeoServer.
Add WKT EPSG:3857 code to epsgproperties file.
Is something that just happen when the shapefile is in EPSG:3857. Everything
works when uploading the very same shapefile in EPSG:4326 (this one is not
in GeoServer anymore).
–
View this message in context: http://osgeo-org.1560.x6.nabble.com/OL-layer-preview-error-for-shapefile-tp5295711.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Geoserver-users mailing list
Geoserver-users@anonymised.com.382…sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.