Questions tagged [map-projections]

A map-projection transforms the coordinates of the spherical earth to a flat map in cartesian (x,y) space.

A map-projection transforms the coordinates of the spherical earth, usually given in degrees (latitude, longitude), to a flat cartesian (x,y) space.
There is no perfect projection, it can be proved that each projection has a drawback, one have minor others major ones.

448 questions
23
votes
2 answers

How to properly plot projected gridded data in ggplot2?

I've been using using ggplot2 to plot climatic gridded data for years. These are usually projected NetCDF files. Cells are square in model coordinates, but depending on which projection the model uses, might not be so in the real world. My usual…
AF7
  • 3,160
  • 28
  • 63
17
votes
9 answers

Where can I find the coordinates needed to draw the US in the Mercator projection?

So I'm writing a Javascript library that takes x,y coordinates and uses them to draw a map of the US. To do this, I need to find the coordinate data necessary to draw each state. This map on Wikipedia is a great example of what I need, because the…
Eli Courtwright
  • 186,300
  • 67
  • 213
  • 256
16
votes
3 answers

How to transform a distance from degrees to metres?

I'm using OpenLayers with an ordinary mercator map and I'm trying to sample a bounding box by finding a grid of points in latlong. The bbox is expressed in latlon, e.g. 48.1388,-15.3616,55.2057,-3.9359 I can define a distance in degrees (e.g. x:…
Mulone
  • 3,603
  • 9
  • 47
  • 69
15
votes
2 answers

Set the right crs on sf object to plot coordinate points

I'm trying to define the right CRS for my sf object. I want to plot points atop the following layer (country: the Netherlands): Simple feature collection with 380 features and 3 fields geometry type: MULTIPOLYGON dimension: XY bbox: …
Tdebeus
  • 1,519
  • 5
  • 21
  • 43
13
votes
1 answer

Math Behind MKMetersPerMapPointAtLatitude

I'm trying to convert some Apple mapping code to Java. I have most of it converted correctly except for a few calls to MKMetersPerMapPointAtLatitude I have a very close solution... but it's not exact and I'm not sure why not. Any ideas? #import…
Shaun
  • 3,777
  • 4
  • 25
  • 46
13
votes
2 answers

Java - Hibernate criteria.setResultTransformer() initializes model fields with default values

I am new to Hibernate and I am trying to get some data from the database. I don't want to get the full data but a projection of an entity. The thing is that in the for-loop when I get the id and the name of my projection, it gets the default values…
Denis Rizov
  • 383
  • 1
  • 4
  • 17
12
votes
1 answer

Re-project Web Mercator tiles to arbitrary projection with D3?

It's been a few years since Jason Davies blew us away with Reprojected Raster Tiles—that map stopped working because Mapbox is blocking his site, but the Mollweide Watercolour and Interrupted Goode Raster remain great demos. Now on Observable HQ I…
Ahmed Fasih
  • 6,458
  • 7
  • 54
  • 95
12
votes
3 answers

how map 2d grid points (x,y) onto sphere as 3d points (x,y,z)

I have a set of 2d grid points (x,y) that I want to map/project onto a sphere as 3d points (x,y,z). I realize there will be some warping towards the poles as abs(y) increases but my grid patch will only cover a portion of the sphere near the equator…
milkplus
  • 33,007
  • 7
  • 30
  • 31
10
votes
1 answer

Efficient way to plot data on an irregular grid

I work with satellite data organized on an irregular two-dimensional grid whose dimensions are scanline (along track dimension) and ground pixel (across track dimension). Latitude and longitude information for each centre pixel are stored in…
stm4tt
  • 755
  • 1
  • 5
  • 22
10
votes
2 answers

how to snip or crop or white-fill a large. expanded (by 10%) rectangle outside of a polygon with ggplot2

this question is a follow-up of my prior SO question and is related to this question. i'm just trying to white-fill an area 10% bigger than a simple polygon with ggplot2. maybe i'm grouping things wrong? here's a photo of the spike with…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
9
votes
1 answer

How to transform coordinate from WGS84 to a coordinate in a projection with PROJ.4?

I have a GPS-coordinate in WGS84 that I would like to transform to a map-projection coordinate in SWEREF99 TM using PROJ.4 in Java or Proj4js in JavaScript. Its hard to find documentation for PROJ.4 and how to use it. If you have a good link, please…
Jonas
  • 121,568
  • 97
  • 310
  • 388
8
votes
1 answer

How to reliably generate hexagonal grid over a world map

Goal I'm attempting to build an application whereby the whole world map is split into a large number of hexagons. These hexagons, once generated would always cover the same area on the map. Then, given certain geographical coordinates, a hexagon…
Maciej Gurban
  • 5,615
  • 4
  • 40
  • 55
8
votes
1 answer

How to make Peirce projection algorithm allow for 360 degrees rotation?

I'm using this algorithm for Peirce world map projection in R. I'm able to do some fine maps, for instance using 28 as the value for the lambda_0 parameter in function toPeirceQuincuncial, since this angle creates less land distortion and breaks no…
Rodrigo
  • 4,706
  • 6
  • 51
  • 94
8
votes
2 answers

Wrapping great circles with Mercator maps with D3.js, Leaflet, or Mapbox

The question, in short: How can I accurately project a wrapping great circle radius in Mercator using something other than the Google Maps API? The question, in long: So I've got a conundrum. I run a mapping application that uses Google Maps API to…
nucleon
  • 861
  • 6
  • 22
8
votes
1 answer

OpenCV Equirectangular Rotation

I'm currently stuck on achieving an equirectangular rotation on a 360° image with OpenCV because of my mathematical understanding (nearly zero) of projections and rotations matrixes. The result of a such rotation would be exactly what you can see…
Bueare
  • 89
  • 3
1
2 3
29 30