Questions tagged [proj4js]

Proj4JS is an open source JavaScript library that transforms map coordinates between different coordinate systems and projections.

Described as being a JavaScript port of the popular Proj.4 C library, in reality Proj4JS is only a loose port. It is a little easier to use, but can use the same specifications (eg. abbreviations for specific projections).

Due to its use as a client JavaScript lbirary, Proj4JS is much more lightweight. Whilst Proj.4 supports all but the most esoteric continuous map projections, Proj4JS only supports a subset of the most popular. Similarly, Proj.4 can be loaded with databases of various coordinate systems (eg. EPSG codes) but Proj4JS is usually only loaded with a handful of those used at runtime.

Further information and source code can be found here:

http://proj4js.org/

123 questions
4
votes
5 answers

map geo coordinates (lat, lng) to map (x, y)

I have the geo-coordinates (latidute & longitude) of some cities and would like to get the x,y coordinates so can plot them into a map. The map is a standart one, just like http://www.wordtravels.com/images/map/Spain/Fuerteventura_map.jpg for…
gucki
  • 4,582
  • 7
  • 44
  • 56
4
votes
2 answers

postgis / proj 900913 to 4326 projection issues with Y coordinate

this is an oldie, but i cannot seem to find a solution. When i want to do an st_transform on a 900913 coordinate to a 4326 system, the y coordinate shifts. example: SELECT AsText( Transform( Transform( GeomFromText( 'POINT( 449760.25168159…
EJatAND
  • 41
  • 1
  • 3
4
votes
3 answers

Calculating the bounding box using Javascript

I have a latitude/longitude value and distance value. I need to calculate a bounding box with the given location as the center. so if the distance was 200 meters then the rectangle box should be 200 meters in front, behind, to left and right. How…
Dave
  • 41
  • 1
  • 2
4
votes
1 answer

How can I use a Mapnik-Backgroundlayer with lat-lon layers in one map with OpenLayers?

I have an application with a map-client using OpenLayers. I want to use Mapnik-data as background-layer, as provided with the class OpenLayers.Layer.OSM.Mapnik. For that I have to switch to the projection EPSG:900913. But I also want to display some…
Mnementh
  • 50,487
  • 48
  • 148
  • 202
4
votes
2 answers

Convert ESRI projection coordinates to lat-lng

I have a large dataset of x,y coordinates in "NAD 1983 StatePlane Michigan South FIPS 2113 Feet" (aka ESRI 102690). I'd like to convert them to lat-lng points. In theory, this is something proj is built to handle, but the documentation hasn't given…
Matt Hampel
  • 5,088
  • 12
  • 52
  • 78
3
votes
3 answers

How can I mix layers with different coordinate system in OpenLayers?

I'm using an OpenLayers-map and I want to use in it different mapservers, that use different coordinate systems. Can OpenLayers integrate it in the same map and automatically converts coordinate-systems?
Mnementh
  • 50,487
  • 48
  • 148
  • 202
3
votes
1 answer

Vertical alignment of TMS tiles in Leaflet using EPSG:25832 projection

I am using Leaflet with Proj4Leaflet to work with tiles in 25832. The application is fairly simple: I am trying to overlay tiles in EPSG:25832 onto a omniscale basemap. I have copied the individual resolutions and origin from the tilemap meta…
Timothy Dalton
  • 1,290
  • 2
  • 17
  • 24
3
votes
2 answers

how to call parameterized javascript function in the WebKit?

I am trying to pass 2 parameters to a javascript function.This code webview.loadUrl("javascript: function_to_call();"); works fine without parameters but i couldn't use it with parameters. This is javascript junction : function changeLocation(_lon ,…
dirhem
  • 611
  • 1
  • 12
  • 24
3
votes
2 answers

Overlay for plotting MGRS

I'm trying to plot MGRS lines over a map in an overlay using OpenLayers (JavaScript). Where I'm really having problems is identifying the strange squares (non-100kmx100km grids). Does anyone know where I might find an algorithm for plotting…
MilkJug
  • 203
  • 3
  • 10
3
votes
2 answers

Convert lat / lon to pixel locations

I've got a map (Mercator), and the coordinates of the 4 corners of the map. I need to come up with something so I can convert given coordinates to corresponding points on the map. I can't use google or anything of the sort, which is why I'm…
EJ Lennox
  • 41
  • 3
3
votes
3 answers

How do I guess which geographic projection system is used for a dataset?

I have a bunch of shapefiles to convert to kml. I can open them, but I don't understand the coordinate systems they are in (nor was it provided by the creators). For instance, this should be a point on the border of the city of Amsterdam: 'x':…
silviot
  • 4,615
  • 5
  • 38
  • 51
3
votes
2 answers

Proj4js - Can you convert a Lat/Long to UTM without a zone?

I'm trying to use Proj4js to perform some coordinate conversions but there is very little information out there on how to use it. What I want to be able to do is convert a latitude and longitude to a UTM coordinate but I don't know what the zone…
mudrock
  • 75
  • 1
  • 9
3
votes
2 answers

How to include JavaScript libraries?

I'm having trouble with including the proj4.js JavaScript library in my code. The code looks like this: Proj4js Testing