0

I am trying to display a GeoPackage of points with OpenLayers from GeoServer; however when I try and render the map the points appear to be duplicated.

When I generate a CSV with Layer Preview in GeoServer, the points appear to be correct, but when I view the PNG or OpenLayers they appear to be duplicated in a repeating pattern, as shown in this image:

Duplicated points

Why may this be the case? I have tried everything from disabling tile caching to changing the projection (I'm using ESPG:4326) but nothing seems to work.

EDIT:

Below is a sample of the CSV file exported from Layer Preview in GeoServer.

FID,geom,set,name
CigaretteCards.1,POINT (5271.757121028228 -2283.97272121377),FamousGunslingers,Frank Heck
CigaretteCards.2,POINT (5442.08821142518 -1988.5248326741105),FamousGunslingers,Otis Miller Boys
CigaretteCards.3,POINT (5150.946445957355 -1633.9873664265206),FamousGunslingers,Jack Hall Gang
CigaretteCards.4,POINT (7259.989834917378 -2317.2255604907045),FamousGunslingers,Butcher Brothers
CigaretteCards.5,POINT (6361.923945380633 -3788.005818581249),FamousGunslingers,Flaco Hernandez
5
  • If you zoom in do the repeated ones disappear?
    – Ian Turton
    Commented Sep 11, 2022 at 17:38
  • The image provided is just the static PNG image from Geoserver, but in the OpenLayers view they do disappear as I zoom in. Commented Sep 11, 2022 at 17:47
  • I'd put a base map behind the points, but it looks like you are looking at number of world's at that zoom level
    – Ian Turton
    Commented Sep 11, 2022 at 18:15
  • That's what I tried with the OpenLayers preview; a base map behind. The base map works fine when you zoom out then the points appear to duplicate to other locations on the map. Commented Sep 11, 2022 at 18:19
  • 1
    Please edit your question with some of the rows of the CSV file
    – Ian Turton
    Commented Sep 11, 2022 at 18:43

1 Answer 1

0

The coordinates are clearly not in EPSG:4326, map wrapping is likely porting over the points that are beyond -180°/180° into the sane range. I see two options:

  • Give them a true projected CRS, e.g., EPSG:32632, and reconfigure the layer from scratch
  • Disable map wrapping in the WMS settings
1
  • Thank you, disabling map wrapping fixed it. I wasn't sure what CRS to use since it was a fictional map, but I may consider choosing a projected CRS. Commented Sep 13, 2022 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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