I'm using PHP's cURL to upload Shapefiles to my GeoServer. It works fine but, sometimes, some of the Shapefiles got correctly uploaded but they aren't published automatically. Other times they do (thats what I want).
If I try to manually publish one layer uploaded this way I got two errors:
I see in the config that my native SRS shows as
UNKNOWN and the declared SRS is empty (I'm sorry for the screenshot, my GeoServer is automatically configured in Catalan and I can't set the language to English):
I guess the problem comes from the
.PRJ file in my Shapefile, but I don't know if that's true and if there's really an error there...
.PRJ on my files:
PROJCS[ "ETRS89_UTM_zone_31N", GEOGCS[ "GCS_ETRS_1989", DATUM[ "D_ETRS_1989", SPHEROID["GRS_1980",6378137,298.257222101] ], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295] ], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",3], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1] ]
My correct SRS should be EPSG:3043 (or the equivalent EPSG:25831). Is there something wrong with my
After Andrea's answer, all of my uploaded Shapefiles get the correct SRS but in some cases they aren't still published due to the
Field 'latLonBoundingBox' is required error. So,
Is there a way to force the calculation of the BoundingBox at upload time (best option) or after upload with another API call (not that good...)?