Andrea, When I load your layer in QGIS, it also loads with "Unknown CRS" but is assumed to be EPSG:26917. I am using QGIS 3.10.4. So there is something wrong with the way Geoserver exports the proj file for shapefiles.
Cliff On Wed, May 6, 2020 at 11:38 AM Andrea Aime <andrea.a...@geo-solutions.it> wrote: > Hum, just did a quick test with: > > > http://gs-stable.geo-solutions.it/geoserver/gs/ows?service=WFS&version=2.0.0&request=GetFeature&typeName=gs%3Any_landmarks&srsName=EPSG:26917&outputFormat=SHAPE-ZIP > > The prj returned contains: > > PROJCS["NAD83 / UTM zone 17N", GEOGCS["NAD83", DATUM["North American Datum > 1983", SPHEROID["GRS 1980", 6378137.0, 298.257222101, > AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], > AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich", 0.0, > AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], > AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], > AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator", > AUTHORITY["EPSG","9807"]], PARAMETER["central_meridian", -81.0], > PARAMETER["latitude_of_origin", 0.0], PARAMETER["scale_factor", 0.9996], > PARAMETER["false_easting", 500000.0], PARAMETER["false_northing", 0.0], > UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], > AUTHORITY["EPSG","26917"]] > > which seems valid. > When opening the shapefile with qgis 3.8 I don't get an "unkonwn crs" > message, but get a bizzarre dialog asking me to > choose the datum shift options.. when the WKT is explict about which set > to use already: > > [image: image.png] > > So odd behavior, but apparently not the same one. > > Cheers > Andrea > > > On Wed, May 6, 2020 at 5:32 PM Ian Turton <ijtur...@gmail.com> wrote: > >> The output has the correct projection but as it is WFS 2.0.0 it uses a >> new style of CRS description (exactly which is controlled in the WFS >> settings) the problem is the QGis doesn't understand them so you need to >> tell it what the projection actually is. This is the one (and only) time it >> is safe to use the Set Projection option on a QGis layer. >> >> I suspect the quick and dirty fix is to change the setting for GML3.2 to >> EPSG Codes and then look to fix QGis. >> >> Ian >> >> On Wed, 6 May 2020 at 16:19, Cliff Patterson <cpatter...@psdrcs.com> >> wrote: >> >>> I am using Geoserver 2.15.2 and making a request to export data in >>> shapefile format using the following URL: >>> >>> https://example.com/geoserver/ows?service=wfs >>> &version=2.0.0 >>> &request=GetFeature >>> &outputFormat=shape-zip >>> &srsName=EPSG:26917 >>> &BBOX=-82.22789,42.95715,-82.09450,42.96317,EPSG:4326 >>> &typename=workspace_name:layer_name >>> >>> When loading the result into QGIS, it has an "Unknown CRS" but the data >>> align properly with EPSG:26917 (the desired output CRS). Likewise, if I set >>> the srsName parameter to EPSG:4326, the resulting layer as an "Unknown CRS" >>> but the data align with EPSG:4326. >>> >>> Note that the native CRS for this layer is EPSG:3857 and it is >>> reproejected to the declared CRS of EPSG:4326. >>> >>> How can I make sure the exported data have the correct EPSG assigned? >>> >>> Many thanks, >>> Cliff >>> >>> -- >>> >>> Cliff Patterson Ph.D. >>> >>> *PSD* | Senior GIS Consultant >>> P: 519-690-2565 ext. 2616 >>> www.psdrcs.com >>> London | 148 Fullarton St. 9th Floor >>> >>> _______________________________________________ >>> Geoserver-users mailing list >>> >>> Please make sure you read the following two resources before posting to >>> this list: >>> - Earning your support instead of buying it, but Ian Turton: >>> http://www.ianturton.com/talks/foss4g.html#/ >>> - The GeoServer user list posting guidelines: >>> http://geoserver.org/comm/userlist-guidelines.html >>> >>> If you want to request a feature or an improvement, also see this: >>> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer >>> >>> >>> Geoserver-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >>> >> >> >> -- >> Ian Turton >> _______________________________________________ >> Geoserver-users mailing list >> >> Please make sure you read the following two resources before posting to >> this list: >> - Earning your support instead of buying it, but Ian Turton: >> http://www.ianturton.com/talks/foss4g.html#/ >> - The GeoServer user list posting guidelines: >> http://geoserver.org/comm/userlist-guidelines.html >> >> If you want to request a feature or an improvement, also see this: >> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer >> >> >> Geoserver-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > > > -- > > Regards, Andrea Aime > > == 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 > ------------------------------------------------------- *Con riferimento > alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - > Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni > circostanza inerente alla presente email (il suo contenuto, gli eventuali > allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i > destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per > errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le > sarei comunque grato se potesse darmene notizia. This email is intended > only for the person or entity to which it is addressed and may contain > information that is privileged, confidential or otherwise protected from > disclosure. We remind that - as provided by European Regulation 2016/679 > “GDPR” - copying, dissemination or use of this e-mail or the information > herein by anyone other than the intended recipient is prohibited. If you > have received this email by mistake, please notify us immediately by > telephone or e-mail.* > -- Cliff Patterson Ph.D. *PSD* | Senior GIS Consultant P: 519-690-2565 ext. 2616 www.psdrcs.com London | 148 Fullarton St. 9th Floor
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users