Skip to main content
9 votes
Accepted

QGIS Vector layer stretched across entire map

The principle The solution consists of a few simple steps: reproject your polygon to a Pacific-centered CRS and create a line for the antimeridian in the same CRS. Create a small buffer around this ...
Babel's user avatar
  • 74.9k
8 votes
Accepted

Transforming a shapefile from EPSG:3338 to EPSG:4326?

You can use -wrapdateline in ogr2ogr to split the polygons at the anti meridian (as the dateline in fact misses Alaska). ogr2ogr -s_srs EPSG:3338 -t_srs epsg:4326 -wrapdateline output.shp ...
Ian Turton's user avatar
  • 83.2k
8 votes
Accepted

Reprojecting over the Pacific Ocean with EPSG:3832 gives artefacts

Artifacts are caused by the polygons that crosses the antimeridian, which for your projection is defined at -30 degrees. Therefore you must find a way to create a polygon centered at -30 degrees, with ...
Gabriel De Luca's user avatar
7 votes

GDAL VectorTranslate creates shards/fragments along anti-meridian

It seems that geopandas is the tool for the job in this scenario. I attempted using transform_geom from Fiona as suggested here but the results were the same as what you show above. But, since ...
snowman2's user avatar
  • 7,527
6 votes

World Map without break line at 180 Meridian (Russia)

There are several options 1. World polygons provided by QGIS You can set your project CRS to Equal Earth (8857) In the coordinate box at the bottom of the screen, type world: This is what you will ...
Kasper's user avatar
  • 3,584
5 votes
Accepted

Un-splitting data that crosses antimeridian in ArcMap?

Figured this out. Changing the data frame projection to PCD Mercator (http://epsg.io/3832) centers view on pacific, running Point to Line on data with PCD Mercator produced un split pacific line.
Medeiros Cartography's user avatar
5 votes
Accepted

Cannot split vector across the 180degree line in QGIS

Re-project your polygon to a pacific-centered CRS (the same you use as project CRS: EPSG:3832; or the same I used EPSG:8859) and set the project CRS to the same projection. Than you can split the ...
Babel's user avatar
  • 74.9k
5 votes
Accepted

Leaflet making ap invisible out of the world's edge

What you want to achieve cannot be done at the map level. You can achieve this at the tile layer level with the noWrap option set to true. For example, for OSM layer this would look something like ...
TomazicM's user avatar
  • 27k
5 votes
Accepted

New Zealand map that includes Chatham Islands

First, the detail level of the query is too low to get the islands. Also, WGS 84 lat/long is not the recommended coordinate reference system for this case. Use an appropriate CRS for NZ: newzealand &...
aldo_tapia's user avatar
  • 13.8k
4 votes
Accepted

Grid of meridians and parallels from South Pole in QGIS print composer

You can create the grid lines using geometry generator by creating buffers around the south pole. The distance between Degrees of Latitude is ca. 111 km. Use this value and mulitply it, using ...
Babel's user avatar
  • 74.9k
3 votes
Accepted

Use map projections to find closest point over dateline

I experimented further with map projections and found a solution for the "Not OK" case. The trick was to first project the data to a projected coordinate system using a central meridian which ...
C.Riedel's user avatar
  • 285
3 votes

Does exist a Python library to generate polygons avoiding antimeridian issues?

I would suggest looking into Xarray here is a thread xarray slicing across the antimeridian that covers a use for perhaps what you are looking for. This thread isn't answered but provides another ...
whyzar's user avatar
  • 12.1k
3 votes
Accepted

Is there an inverse operation to ST_Shift_Longitude in PostGIS < 2.3?

Use shifted_geom::geography to cast the shifted_geometry to a geography: SELECT ST_AsText( 'POLYGON( ( 176.792 -12.2085, 182.1313 -12.2085, 182.1313 -...
das-g's user avatar
  • 1,477
3 votes

Leaflet MapBox Issue of poly line which crosses the antimeridian

Ah, antimeridian artifacts. See https://stackoverflow.com/questions/40532496/wrapping-lines-polygons-across-the-antimeridian-in-leaflet-js for some similar problems. Let me quote two relevant bits: ...
IvanSanchez's user avatar
  • 10.3k
3 votes

The International Date Line wrap around

EPSG:3832 (WGS84 PDC) is a Pacific Ocean centered projection. This will trade IDL crossing problems for Prime Meridian crossing problems. This may not be an issue depending on what you're depicting. I ...
Will's user avatar
  • 131
3 votes

The International Date Line wrap around

I had been researching this issue for quite a while as I have developed an application that allows the user to generate an Area of Interest rectangle either via a DragBox action or plotting User ...
user1593611's user avatar
3 votes

Polygons across international dateline [-180..+180 longitude]

Thanks to @AndreJ for this idea, using Django GEOS API here is a simple solution that avoids needing to re-project anything: 1) Create a MultiPolygon that borders on the dateline: from django....
GreenTurtle's user avatar
3 votes
Accepted

Wrapping a GeoTIFF over the antimeridian in QGIS

You need a projection that places the focus on New Zealand. Set the Project CRS to EPSG:3851 (Project > Properties... > CRS) Reproject the bathymetry tif to EPSG:3851 (Raster > Projections > Warp (...
StefanBrand_EOX's user avatar
3 votes

Leaflet Shiny and polygons across the dateline

Good news! I found a solution in the sf vignette. Adjust the sf geometry values as follow: sf_data$geom <- (st_geometry(sf_data) + c(360,90)) %% c(360) - c(0,90) This offsets the geometry values ...
HDK's user avatar
  • 41
3 votes

PostGIS - Polygon crossing latitude 0 and longitude 180

You're right with the fact that crossing the borders is the problem. And you're crossing 2 borders: the 180° and the north pole. The thing is, here you work in 4326. When you build the polygon from ...
robin loche's user avatar
  • 2,505
3 votes

Splitting polygons crossing the antimeridian

I have managed to use your script and end-up with two part circles for those which overlap the 180 longitude line. The way I did it: Create your buffer layer Reproject it to EPSG:3832 ("...
Kasper's user avatar
  • 3,584
2 votes

How to stop gdalwarp creating world-spanning outputs near the dateline?

As I was facing the same problem, I wrote a small shell script that finds out if the raster file crosses the dateline. If true, following option is added to gdalwarp: --config CENTER_LONG 180 This ...
pLumo's user avatar
  • 6,569
2 votes

Shapely polygons crossing the antimeridian

You can create polygons with longitude that goes beyond -180°, in this case the western bound of your polygon will be at -184°. from shapely import wkt polygon_wkt = 'POLYGON((-184 49,-65 49,-65 11,-...
Shawn's user avatar
  • 1,928
2 votes
Accepted

Does exist a Python library to generate polygons avoiding antimeridian issues?

In a context of GeoJSON files (in which I was inserted) I've preferred to use a solution that uses gdal.VectorTranslate method, because it provides compliance to the RFC 7946 standard, that also ...
Ricardo Barros Lourenço's user avatar
2 votes

How can I convert PostGIS geography to geometry and split polygons that cross the antimeridian

The 180th Meridian was a handy reference for me understanding this problem. I think working with Common Table Expressions (CTE) may give you better performance than all the temporary tables required ...
Pete's user avatar
  • 353
2 votes

Changing projection from 0 360 to -180 180 for a simple raster

As you can see in following image, I have loaded in QGIS 3 a raster (world_0_360.tif) with longitudes from 0 360 and with latitudes from -90 90. Afterward, I tried out an equivalent command used in ...
xunilk's user avatar
  • 30.2k
2 votes

Line through polygons spanning 180-degree line

Yes! With help from @fatih_dur in comments, I was able to use the Integrate tool, with a 500+ m tolerance, to resolve a small gap between the polygons.
user116949's user avatar
2 votes

Get a bounding box of a geometry that crosses the antimeridian using OGR

The easiest way I found to get the bounding box from a geometry that crosses the antimeridian using OGR/GDAL is by using the gdal.VectorTranslate() function, which is the Python binding for OGR2OGR. ...
Stijn's user avatar
  • 21
2 votes
Accepted

Get a bounding box of a geometry that crosses the antimeridian using OGR

I've got an answer to the github issue from Evan Rouault: GetEnvelope() computes the envelope in a pure non-geo aware way. It has no notion of SRS / antimeridian / etc. So what you get is the ...
dr_times's user avatar
  • 938
2 votes
Accepted

Removing 180th meridian line on map of Russia?

Note, that feature class is one multipolygon comprised of 839 polygons. If you run the multipart to singlepart tool, you'll see that. Anyway, the simplest way is to just turn off the border in the ...
user2856's user avatar
  • 69.6k

Only top scored, non community-wiki answers of a minimum length are eligible