Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [proj4js]

JavaScript library to transform coordinates.

0
votes
0answers
11 views

Difference when using cs2cs and proj4 in my code

I'm trying to convert some coordinates from a system used in Buenos Aires to epsg:4326. When I try it running cs2cs or proj4js I get the correct results. However, when I embed proj4 in my iOS project,...
2
votes
1answer
114 views

Angular rotation using Proj4, for local coordinate system

I have a polygon feature on map to which I need to transform the coordinates to local coordinate system with respect to new origin while keeping the same datum. So far using the Proj4 library and by ...
1
vote
0answers
22 views

Required version of proj4.js with OpenLayers 4.6.4

I am currently using the version 2.2.2 of proj4.js with OpenLayers 4.6.4 and I plan to move to the version 2.4.3 of proj4.js because it resolves a defect that I have. However, I wanted to know if ...
1
vote
1answer
209 views

OpenLayers ol.proj.get returns null after adding projection definition to Proj4

I just stumbled upon the following problem : OpenLayers is unable to retrieve a projection definition even though it has been previously registered with Proj4JS. Code below : import proj4 from '...
2
votes
1answer
49 views

Reproject xyz-tilelayer to Mollweide

As OpenLayers supports raster reprojection I would like to make it reproject xyz-tilelayers e.g. from OSM, Mercator projection to Mollweide projection (ESRI:53009). From this example I took the ...
1
vote
1answer
81 views

Coordinate transformation results are different between Proj4JS and pyproj

I try to make a coordinate converter using Proj4JS for mobile app, I use this source code. Before I tested conversion for WGS84 geographic and WGS84 UTM, there was not problem with it. I tested ...
1
vote
0answers
120 views

Leaflet: trying to calculate tile row and column

I have a map, where I am using EPSG:25832 as CRS, and I am trying to add a tilelayer, which needs to get tileinformation in EPSG:3857 CRS - let me elaborate on that: The source, from where I retrieve ...
1
vote
0answers
35 views

how transforms coordinates etrs89 in wgs84 with javascript

I'm programming a web page with visual studio and I'm trying to make a javascript to use my page, the script has to transform the coordinates X, Y etrs89 Wgs84 coordinates that can read google, I ...
1
vote
2answers
273 views

script convert coordinates ETRS89 to WGS 84

i am using proj4js 2.4.3 and programming a script to convert coordinates etrs89 to wgs84 can someone give me an opinion on whether it is correct? do not know if i am using proj4js well? I have ...
0
votes
2answers
225 views

Proper projection for Utm for geojson

I have a geojson file in utm coordinate (WGS_1984_UTM_Zone_39N) and i'm trying to load it via openlayers. I have the blow code and it's work with long/lat coordinate but not with utm: proj4.defs('...
5
votes
1answer
432 views

Convert Lat/Lon sexagesimal degrees to UTM coordinates

I'm using proj4.js to convert geographic coordinates (degrees, minutes and seconds) to UTM coordinates (ETRS89 Zone 30). When I get my coordinates result of the transformation I'm checking them with ...
4
votes
0answers
103 views

proj4js gives wrong result for EPSG:3375

Faced with very strange issue. Trying to do coordinate transformation from EPSG:4326 to EPSG:3375 using proj4js and getting wrong result. This is my code: var epsg4326 = '+proj=longlat +datum=WGS84 +...
2
votes
1answer
303 views

OpenLayers 4 ScaleLine with projection

I search a lot about this problem but I don't find a solution, so... I'm using a projection and the scaleLine display the value 100.000 greater than the real value, How can I solve this problem? Here ...
4
votes
1answer
146 views

proj4js, proj4.net, proj4 give different result to cs2cs

I'm trying to convert between two arbitrary projected coordinate reference systems, but every proj.4 library variant that I've tried has given a results different from QGIS's cs2cs application (which ...
2
votes
1answer
218 views

Leaflet unproject from EPSG:25831 doesn't work

In a leaflet map that uses EPSG 25831 to get WMS request, it works fine to call to "project" function to get UTM coordinates of one coordinates pair that I got from the map in WGS84, but inverse ...
3
votes
1answer
2k views

OpenLayers and proj4js.defs() - why does one custom projection work and not the other?

The javascript at https://jsfiddle.net/nsands/kvhcuL72/ is the simplest demonstration I've come up with for this issue. It is based on OpenLayers example code, but I've defined the map projection ...
3
votes
0answers
88 views

Proj4Leaflet - Defining World Eckert IV

I'm trying to make a Leaflet map with World Eckert IV projection using Proj4Lefalet. From what I understand, I should be able to define my CRS like so: var crs = new L.Proj.CRS('ESRI:54012', '+...
3
votes
2answers
297 views

OpenLayers 3 not recognising proj4 custom projection

I'm trying to create a proj4 custom projection for use with my openlayers map. However, when after creating the projection with proj4 I am unable to use it with openlayers projections because ol.proj....
0
votes
1answer
130 views

proj4js and GRS 1980

I'm trying to convert GRS 1980 (ellipsoid) to WGS84 using Proj4js. The code that I'm currently using is: proj4('GRS1980','WGS84'[184058,674431]); The problem is that Proj4js does not accept GRS1980 ...
8
votes
1answer
411 views

Leaflet + Proj4Leaflet + EPSG3995 +WMS

I am trying to support a WMS layer with a North Polar Stereographic projection (EPSG3995) on Leaflet but cannot make it to work. I used Proj4Leaflet and have created the projection with the ...
3
votes
1answer
341 views

Openlayers(with proj4.js) transforms coordinates incorrectly

I encountered a strange behaviour in Openlayers(2) while transforming a point from EPSG:4326 to EPSG:31467. The Input lat/lon in EPSG 4326 is: 48.002718, 7.841573 This is the output in Openlayers: ...
2
votes
1answer
151 views

Extent for Robinson projection?

I'm trying to use a QGIS WMS layer and show it on a Robinson projection but can't get it working. The ol-debug shows a "transform should be defined" error, I think it's because of a wrong projection ...
0
votes
1answer
220 views

Leaflet JS: Tiles misaligned using WMS resource

in Leaflet JS I instantiated a WMS tile layer object, given a base URL of the WMS service. The wms service projection system is EPSG:32633 (WGS 84 / UTM zone 33N) and I had to use proj4js to project ...
4
votes
0answers
584 views

Load WFS in Leaflet with BBOX query in non-default projection (i.e. not EPSG:3857)

I've had a look at this question: How to add a bounding box filter to this leaflet WFS request? and have been trying to work out how to get it to work in a different projection system, specifically ...
0
votes
1answer
128 views

proj4leaflet with esri-leaflet 1.0.4

We need to add esri-tile layer in leaflet .At first ,we tried proj4leaflet with esri-leaflet 2.0.0 and leafelt 1.0.0. It workded fine. <!DOCTYPE html> <html> <head> <!-- ...
2
votes
1answer
319 views

NAD27 to WGS84 with proj4js

I am trying to use proj4js to convert between WGS84 (4326) to NAD27 BLM 14N (ftUS) (32064). I am using this definition for EPSG 2674 `proj=tmerc +lat_0=0 +lon_0=-99 +k=0.9996 +x_0=500000.001016002 +...
4
votes
1answer
627 views

Rotating geojson feature with Leaflet?

I have a GeoJson feature that is rendered with leaflet and proj4(ESPG:31467). Now I want to rotate that feature so that it NW corner points to NE, e.g. 90 deg rotation. Is there a way to do this? Or ...
2
votes
0answers
137 views

How to instantiate a new map with proj4leaflet projections from a Bootstrap dropdown menu

I'm currently working on a Leaflet website that will be able to display GPS-Tracks with different projections. Now I'm trying to implement a dropdown menu based on Bootstrap, where I can set different ...
1
vote
0answers
57 views

OpenLayers 2 with different projection is giving blank page

The code does not give any exception but nothing appears in the browser. This code works with EPSG:4326. Is this the correct way to define projection? See below for the full code: function init() { ...
3
votes
1answer
211 views

Re-Projection a view openlayers 3

I'm new to GIS and OL3. My app needs to display a map in EPSG:4326 and the same app has to display a map in EPSG:3412 when I click on a button. Here is the link for the JSFiddle http://jsfiddle.net/...
0
votes
1answer
300 views

Proj4Leaflet with EPSG:2263 does not seem to project correctly

For some reason EPSG:2263 projections seem to be incorrect. The tile server works properly at all zoom levels as configured. However, the tiles are rendering at the incorrect latLong. Origin was ...
5
votes
0answers
371 views

proj4js with geocentric CRS

I am developing a little web app to transform coordinates between CRSs. To do that I am using proj4js, but I notice that proj4js can't work with geocentric CRSs. Is there another tool similar to ...
3
votes
1answer
590 views

Difference in EPSG:28992 (RD/Amersfoort) definitions

I need to do some projections between WGS84 (EPSG:4326) and the Dutch RD system (EPSG:28992) in JavaScript. I use Proj4js for this. When adding the definition from spatialreference.org I noticed a ...
3
votes
1answer
266 views

Coordinates translation issue (from EPSG:23030 to EPSG:4326)

I'm trying to figure out how to make some translations from UTM/ED50 to WGS84. The reason I need to do them is that my data source's coordinates are in EPSG:23030 format, and I need to represent them ...
2
votes
1answer
332 views

proj4js: converting EPSG:3857 to SWEREF99 TM [closed]

I'm trying to convert a EPSG:3857(Google/OSM) coordinate to a SWEREF99 TM coordinate using proj4js but the following code produces a invalid result: sweref99 = "+proj=utm +zone=33 +ellps=GRS80 +...
0
votes
1answer
80 views

Proj4js Projection anomaly between function vs string projection definition

We recently switched our definitions from the first to the second format, because OpenLayers threw exceptions on the first one. The used definitions: Old: proj4.defs["EPSG:28992"] = "+proj=sterea +...
0
votes
1answer
498 views

Use Lambert 93 imageOverlay with Leaflet on top of OSM tiles layer

I'm trying to use a Lambert 93 image overlay on top of an Open Street Map title layer. var map = L.map('map'); L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { }).addTo(map); var coords = { ...
2
votes
1answer
198 views

Equivalent of pyproj preserve_units for Proj4js

I am attempting to convert from EPSG 4326 to State Plane NAD83 using Proj4js but the results are coming out in meters. In python there is an option to preserve the units such as: p1 = Proj( init="...
1
vote
1answer
229 views

error: 'Cannot read property 'divideBy' of undefined', L.Proj with esri.leaflet

I am trying my first attempt at adding an (in-house published) ArcGIS basemap to a Leaflet based web application, using Proj4Leaflet and esri-leaflet. Here is my js: var crs = new L.Proj.CRS('EPSG: ...
5
votes
2answers
3k views

Openlayers 3 WMS custom projection wrong extent

I'm using OpenLayers 3 to view a WMS layer from a server in EPSG:3006, see the code: Proj4js: Proj4js.defs["EPSG:3006"] = "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"; ...
1
vote
2answers
1k views

On load event for Leaflet proj4leaflet projected geoJSON layer

Can't find proper event for vector layer like on "load", to be fired when this layer is fuly rendered. I add vector features to a layer in Leaflet using proj4leaflet from JSON object like this var ...
3
votes
1answer
216 views

Rotation matrix in the EPSG

I use Proj4j for a WebGIS and I have to create a new ESPG. I tried on QGIS to convert coordinates from a local system (in Greece) to a world coordinates system. First, I have to do a 2D ...
1
vote
1answer
552 views

Openlayers2 how to display WFS with projection other than EPSG:4326

Here is some OpenLayers code: var projection = "EPSG:3009"; map = new OpenLayers.Map('map', { // projection: "EPSG:900913", // displayProjection: projection, // displayProjection: "EPSG:...
3
votes
1answer
2k views

Projection transform in OpenLayers3

I am trying to transform a GeoJSON object of a certain transformation (EPSG:28992) into my current map coordinate system (EPSG:4326). I have been trying to do a couple of things but none seem to work. ...
1
vote
2answers
369 views

IE8 problem with proj4.js

This problem is in IE8 and not in Firefox. My first problem was that IE8 don't support JSON natively and I get the "JSON is undefined". I solved this by including json2 or json3. Now JSON.parse (...
3
votes
2answers
5k views

Using Proj4js in Openlayers - Proj4js is not defined

I want to use Proj4js. <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.js"></script> <script type="text/javascript" src="//cdnjs....
4
votes
1answer
5k views

Definitive list of Proj4 supported coordinate systems

I need to determine the minimum set of coordinate systems supported by all tiers of my project's stack. I have a list of EPSG codes supported by Oracle and GeoServer but I'm having trouble finding a ...
4
votes
1answer
543 views

Proj4js: Is this correct implementation of Azimuthal Equidistant relative to an arbitrary center?

If I wanted to interpolate points along a Great Circle Arc, it makes sense that either endpoint of the Great Circle is a satisfactory starting place. Next, I suppose I'll need a projection to preserve ...