Good afternoon, there are a number of questions about the use of the geoserver.
Task:
There is a picture in the format .jpg and the binding file in the format .jgw. The custom coordinate system is also known in advance.
You need to upload the source data to the geoserver, then get this data via the wms protocol in the Web Mercator coordinate system (epsg:3857).
My steps:
- Creating a new Data Source with the WorldImage type (screenshot 1)
The contents of the file folder:data/ofp_test on screenshot 2
- I publish a layer (screenshot 3)
- Adding a new coordinate system to /usr/share/geoserver/data_dir/user_projections/epsg.properties
I named it 391142 (screenshot 4) (after adding it to epsg.properties, I restarted the geoserver)
- Here is my first question. I have no way to change Native SRS to EPSG:391142, because EPSG:404000 is installed and it is not editable. (screenshot 5)
With this Declared SRS, I managed to put EPSG:391142
- Through chrome devtools, I managed to remove the readonly attribute on the Native SRS field, after which I was able to edit and set EPSG:391142 (I’m not sure if this is correct) (screenshot 6)
- I calculated the Native Bounding Box from the data. I calculated the Lat/Lon Bounding Box from the Native Bounding Box.
The numbers show that the Native Bounding Box is calculated correctly relative to the binding file
Lat/Lon Bounding Box is also calculated correctly, I tried to translate these boundaries into Web Mercator (epsg:3857) and got the real location of my picture in epsg:3857. (screenshot 7)
- by link
http://localhost:8080/geoserver/ofp/wms?service=WMS&version=1.1.0&request=GetMap&layers=ofp%3Aofp&bbox=207.556464062072%2C425.1170613763602%2C1886.706464062072%2C1361.1170613763602&width=768&height=428&srs=EPSG%3A391142&styles=&format=application/openlayers
I see a picture in coordinates approximately 900, 900 (screenshot 8) (the second question is, why is it upside down?)
I change the coordinate system in the link to mercator
http://localhost:8080/geoserver/ofp/wms?service=WMS&version=1.1.0&request=GetMap&layers=ofp%3Aofp&bbox=207.556464062072%2C425.1170613763602%2C1886.706464062072%2C1361.1170613763602&width=768&height=428&srs=EPSG%3A3857&styles=&format=application/openlayers
And all that changed was that the picture was rotated correctly, the coordinates remained approximately 900,900
It is unclear why such coordinates are, because taking into account the translation of coordinates into mercator, the numbers should be much larger (approximately 5000000, 9000). (screenshot 9)
What I tried to do:
- changed Declared SRS to mercator
- changed SRS handling to Force declared
Nothing helped.
I will be glad of any help, thank you
|