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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 &...
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 ...
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 ...
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 ...
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 -...
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:
...
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 ...
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 ...
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....
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 (...
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 ...
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 ...
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 ("...
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 ...
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,-...
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 ...
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 ...
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 ...
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.
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. ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
antimeridian × 80qgis × 21
coordinate-system × 19
postgis × 11
polygon × 9
python × 8
leaflet × 8
arcgis-desktop × 6
gdal × 6
r × 6
geojson × 5
gdalwarp × 5
extents × 4
shapefile × 3
wms × 3
splitting × 3
sf × 3
russia × 3
geoserver × 2
postgresql × 2
qgis-3 × 2
openlayers-2 × 2
geotiff-tiff × 2
line × 2
ogr × 2