I have 2 layers under EPSG:3857 and one map under EPSG:4326 to represent the world. When I preview my aggregation of layers, here's what is shown : enter image description here In fact, this is what it should be displayed, on North America coast and Europe: enter image description here

Check the scale which is insane, I had to zoom in a lot.

Why did my layers don't fit the world? My two layers are SQL View Layers and the config is the same : enter image description here

  • you must set the EPSG:4326 one (the USA one) as EPSG:4326 - GeoServer can then reporject it for you – Ian Turton Jan 31 '17 at 10:08
  • @iant I don't understand... I think you wanted to say from 3857 to 4326 but I don't know which layer. I have a line layer, a point layer, a world layer and I aggregate all of them. Should I set native SRS as 3857 then data SRS as 4326, native bound based on SRS and reproject native SRS ? There is a lot of fields and I don't understand, French translation is actually a little messy – So4ne Jan 31 '17 at 10:16
  • set the declared srs to match the file projection - for all the "small" layers set it as 4326 – Ian Turton Jan 31 '17 at 10:18
  • Well... That worked .. do you want to write the answer or should I delete the question? – So4ne Jan 31 '17 at 10:24

The layers that are "too small" are in lat/lon (EPSG:4326) while your countries layer (and map) is in Web Mercator (EPSG:3857).

If you tell GeoServer that the 4326 layers are in 3857 then it will draw the layers without reprojecting them and they will appear to be down on Null Island. To fix this you need to let GeoServer know that they are in 4326 (ideally the .prj file would do this) so that it knows they need converting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.