Skip to main content

Questions tagged [proj4js]

JavaScript library to transform coordinates.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
120 views

About CRS and map origin setting, What is their relation and math equation in leaflet.js via using proj4leaflet.js

I meet a problem about CRS function and map origin setting in leaflet. I use proj4leaflet.js as the basic CRS function, and then after setting the origin of crs and resolution, I can get the correct ...
abramhum's user avatar
  • 123
-1 votes
1 answer
57 views

Custom project DXF data with metre units in JavaScript

I have a GeoJSON file with coordinates in metres in what I believe is the AutoCad World Coordinate System. (I converted from the DXF that was supplied to me, which was exported from AutoCad). The ...
Steve Bennett's user avatar
1 vote
1 answer
568 views

Project React-Leaflet map in different projection

I am working on a college project that deals with MAPS. Our project is related to mapping the location of stadiums for the recent FIFA worldcup. The tileserver url provided to us is custom. When I use ...
Antonius Carvalho's user avatar
0 votes
1 answer
75 views

British National Grid shapefile prj subtle differences change polygon accuracy

I'll preface this question with the statement I know very little about projection systems so this is coming from a position of total ignorance. I have two shapefiles. One is in England and one is in ...
Titan's user avatar
  • 427
1 vote
1 answer
515 views

Transforming point from EPSG:3844 to EPSG:3857 with proj4js

I'm having an issue transforming a point from EPSG:3844 to EPSG:3857 using Proj4JS. The transformation it performs seems off compared to the result given by PostGIS, pyproj, rgeo-proj4 or even epsg.io....
mrk's user avatar
  • 11
1 vote
0 answers
53 views

Different anchor point for EPSG:3857 coordinates [closed]

I have a couple of points in the EPSG:3857 CRS. These points are centered on 0, 0, which is the center of a map. I can convert these points to EPSG:4326 in Javascript with the proj4js library using ...
Pufferfishe's user avatar
0 votes
0 answers
32 views

User Select CRS Tool

I am trying to create a tool which lets the user select a Coordinate Reference System from a list to project their data to. Are there any available libraries (preferably JS), datasets, or API's which ...
rosewall's user avatar
0 votes
1 answer
1k views

Wrapping maps using EPSG:4326 in Leaflet

I'm trying to use a tileserver in my leaflet app that encodes maps in EPSG:4326. I understand that I need to use Proj4Leaflet, and I'm setting up my CRS as follows: const crs = new Leaflet.Proj.CRS( ...
David Hope's user avatar
2 votes
0 answers
331 views

Extent of a proj4 string

I have a custom proj4 string in which my data is represented in Cartesian local coordinates. The example proj4 is below. +proj=tmerc +lat_0=44.155877943 +lon_0=141.655514872997 +k_0=1.000004976 +a=...
arun thatham's user avatar
0 votes
0 answers
491 views

OpenLayers 6 change projection

Can someone please clarify how does the View object in OpenLayers 6 work as to achieve a projection toggle for a OSM and ImageWMS layers Map. I would love to understand how to change the projection of ...
Curious's user avatar
  • 119
2 votes
1 answer
181 views

OpenLayers Raster Reprojection to Mollweide cropped to oval

I'm trying to setup a Mollweide map, and only see a single projection of the world. Without the doubly projected areas in the corners of the map (see included images for clarification). Is there a ...
oogie's user avatar
  • 23
0 votes
0 answers
181 views

Moving WMS overlay independently to match baselayer in OpenLayers

I made a webgis that manages WMS layers in different projections with OpenLayers 4 and proj4js. Sometimes (e.g. for historical maps) the overlay is not perfectly aligned with baselayer and a need a ...
amefad's user avatar
  • 94
0 votes
2 answers
841 views

Given Web Mercator (EPSG:3857) coordinates, how to determine the relevant NAD83 local UTM Zone [duplicate]

I have a set of coordinates in epsg:3857: webmerc_coords = (-8956562.6 5368787.8) Is there a way to determine what the appropriate local NAD83 UTM projection should be for this point? I'm specifically ...
user11705556's user avatar
2 votes
1 answer
205 views

Use Mollweide projection in Leaflet, for a Geoserver WMS layer

I did a world map in Geoserver, showing in Leaflet in the default projection, which is EPSG:900913 (aka GOOGLE Mercator) but I would like to use the Mollweide projection instead. I successfully added ...
Vincent Dc's user avatar
0 votes
1 answer
158 views

Proj4 string for USGS Bulletin 1532

I'm using an application that uses equations from USGS Bulletin 1532 (see source code - line 295: http://docs.ros.org/en/kinetic/api/robot_localization/html/api/navsat__conversions_8h_source.html#...
Samuel's user avatar
  • 91
0 votes
0 answers
448 views

proj4js convert long, lat to x,y by axis by meters

Can anyone provide right projections for proj4js convert long, lat to x,y by axis by meters? Here is my projections: const fromLatLongProjection = '+proj=longlat +ellps=WGS84 +datum=WGS84 +units=...
Audrius's user avatar
0 votes
1 answer
336 views

Adding WMS (IGN) to Leaflet

I'm using Leaflet to display agricultural plots obtain from a WMS. Here is the link to the WMS : https://wxs.ign.fr/agriculture/geoportail/r/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=...
AdBess's user avatar
  • 15
1 vote
1 answer
634 views

OpenLayers - error thrown when registering some proj4 projections

I try to register in OpenLayers 6.8.1 a custom projection from epsg.io. The projection can be defined in proj4 successfully, but OpenLayers throws an undefined error during registration. The code is ...
seb007's user avatar
  • 255
1 vote
1 answer
668 views

Leaflet WMS, loading tiles in EPSG:25833 problem

I would like to load tiles from WMS into my Leaflet application. I am using react but help in vanilla JS will be sufficient as well. All I have is WMS URL: https://fbinter.stadt-berlin.de/fb/wms/...
gikdeb's user avatar
  • 35
1 vote
0 answers
134 views

Localization (via proj4) with multiple points. Datum transformations from state plane to local grid with user defined points

I'm using proj4, And I'm wondering what the best course of action is to convert from state plane to a local grid system. I have files of these points from a .loc filetype that the user specifies. <...
Charles Pettis's user avatar
-1 votes
1 answer
1k views

How do you convert WGS84 GPS coordinates to "SWEREF 99 TM" ones in JavaScript + Leaflet.js + proj4 + proj4leaflet? [closed]

I have made a map system with JavaScript + Leaflet.js + proj4 + proj4leaflet. I'm trying to link to Lantmäteriet's map with the current position, but, of course, they don't use the "WGS84" ...
P Stavropoulos's user avatar
1 vote
1 answer
99 views

Does proj4js is provided with an EPSG dataset?

Is each version of the proj4js project delivered with/against a different EPSG dataset version? (like in the PROJ project) In other words, if I'm using a specific proj4js version, does it mean that I'...
EranGeo's user avatar
  • 1,182
1 vote
0 answers
284 views

Getting incorrect northing/easting in proj4 from converting Lat/long to NAD83 Maine West 1802 [closed]

I'm trying to convert latitude/longitude to northing and easting via proj4js. This is the string im using to project from. +proj=tmerc +lat_0=42.83333333333334 +lon_0=-70.16666666666667 +k=0....
Charles Pettis's user avatar
1 vote
1 answer
354 views

Cannot transform point in OpenLayer (not able to find proj4js)

I am no more able to reproject a point in OpenLayers 6: let center = ol.proj.transform( [2600000.0, 1200000.0], 'EPSG:2056', 'EPSG:4326' ); => But this is working: let center = ol.proj....
swiss_knight's user avatar
  • 10.5k
2 votes
0 answers
214 views

Defining projection surface height in proj4 string

I'm using proj4 in an actual project, which needs accurate projection calculation. To realize accurate projection, it defines a projection surface height, which is calculated from the average altitude ...
xelmirage's user avatar
1 vote
1 answer
674 views

How to use Leaflet to display a map in Lambert Conformal Conic without warping to EPSG:3857

I would like to display a map in leaflet which is in Lambert Conformal Conic. The CRS of this map is: '+proj=lcc +lat_0=38 +lon_0=-100 +lat_1=45 +lat_2=33 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs' ...
jr.'s user avatar
  • 141
2 votes
1 answer
2k views

Add marker to projected coordinates from form-input Leaflet

I am working on a Leaflet map and trying to use an input form to insert my local coordinates that will be projected to WGS84 and displayed on map as a marker but when I try it the button seems not to ...
ElFadily Mohamed's user avatar
2 votes
1 answer
785 views

Error in proj4js-Projection while upgrading from OpenLayers 5 to OpenLayers 6 (ETRS:25832 projection)?

I have a map with some layers in Projection EPSG:25832. This works well with OpenLayers 5.3.3. But when I change to OpenLayers 6.4.3 (or all others down to 6.0.1) then there is an error in the ...
leole's user avatar
  • 317
1 vote
1 answer
1k views

The definition of "is not valid"

When I validate the proj4 parameters it says they are valid but when I press OK I get the above error message. My parameters are: +proj=tmerc +lat_0=0 +lon_0=-117 +k=1 +x_0=-64830 +y_0=-5264340 +ellps=...
Jeffrey Campo's user avatar
0 votes
0 answers
770 views

Transform height position from ECEF (EPSG:4978) to RH2000

I'm a novice regarding coordinate system and projections, and I'm trying to transform ECEF coordinates (projection adopted by Cesium) to the Sweref99 projection including the RH2000 height system (for ...
David Gustavsson's user avatar
0 votes
1 answer
353 views

Invalid result in coordinate transformation [closed]

I want to convert local coordinate (SWEREF99) to Global coordinate(WGS 84). I tried 3 different ways and all produce almost same result which is not correct. From here I got actual result: https://...
shak imran's user avatar
1 vote
1 answer
354 views

Proj4 projection supports WebGLPointsLayer but throws GeoJSON polygons off

In order for the following WebGLPointsLayer this.layer = new WebGLPointsLayer({ source: new VectorSource({ url: "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month....
interwebjill's user avatar
4 votes
2 answers
5k views

Use Proj (Proj4) to convert UTM coordinate to Cartesian coordinate relative to an Earth tangent plane with its origin define as lon/lat? [closed]

I may have asked in the wrong place here, https://stackoverflow.com/questions/61147814. Then I discovered http://gis.stackexchange.com, so I decided to ask again here: I have a UTM coordinate (zone, ...
trusktr's user avatar
  • 149
0 votes
0 answers
103 views

proj.4 — problems to understanding the projection result

I am using pro4js for a webproject to project data obtained from the Openstreetmap database. Basically I have this code (javascript/ES 6): const //some coordinates we = { lon: 50.9802813, ...
philipp's user avatar
  • 101
1 vote
0 answers
49 views

How to find lost information about the projection? [duplicate]

I have problems to find lost projection and hope someone could give a hint. I think there is no way to find the projection automatically so I did try a semi-automatic approach shown below. My ...
BR75's user avatar
  • 447
1 vote
1 answer
700 views

Find the right values for bounds and origin for Proj4Leaflet

I'm using Proj4Leaflet to use tile layers with a different CRS (EPSG:25832) in my leaflet project. Now I am somehow lost in finding the correct values for the bounds and origin of the tiles I want to ...
maaattes's user avatar
  • 157
2 votes
0 answers
1k views

OpenLayers 6 - reprojected GeoJSON data not displaying on map

I'm using latest OpenLayers (6.1.1) and proj4js 2.6.0 to display a multipoint geometry. I first define my input data project with proj4 then create an open layer vector source as follow: proj4.defs("...
Beinje's user avatar
  • 195
3 votes
1 answer
518 views

What is the link between proj4js and proj

Question I am simply wondering, what is the relationship between the web oriented proj4js and the PROJ C++ well known library (on which for example GDAL/OGR relies)? Is there any link between these ...
swiss_knight's user avatar
  • 10.5k
1 vote
1 answer
2k views

Working in projected coordinates rather than lat/long inLeaflet

I'm using proj4js to use the utm33N coordinate system. Leaflet works with latlong, is there anyway for it to work in the projected system, so I can for instance set the centre location based on ...
Spatial Digger's user avatar
3 votes
2 answers
1k views

Determining if coordinates from feature are in EPSG:4326

My idea is before upload a GeoJSON file, check if geometries are in EPSG:4326. I've tried using PostGIS with Find_SRID but return 0 because when I insert geometry I don't know which SRID has the ...
Javier's user avatar
  • 233
1 vote
1 answer
248 views

RTK Coordinates from Phone to WGS84 Dec Deg using ITRF00 Transformation and proj4.js

I am attempting to simulate an RTK GPS unit transmitting a CORS corrected GPS location to a phone. The coordinates are in NAD83 (from CORS) but in the phone they are seen in decimal degrees. I need to ...
Malcolm's user avatar
  • 489
1 vote
0 answers
345 views

Display ESRI MapService (WMTS) with EPSG:28992 coordinate system in Leaflet web map with OpenStreetMap base layer

ESRI MapService https://tiles.arcgis.com/tiles/nSZVuSZjHpEZZbRo/arcgis/rest/services/Historische_tijdreis_1870/MapServer have EPSG:28992 coordinate system. In QGIS I can add this layer via WMTS https:/...
spatialhast's user avatar
  • 3,641
3 votes
0 answers
764 views

EPSG:25833 in LeafletJs [closed]

I am currently working on the different coordinate system. Specifically, I am concerned with the correct presentation of EPSG:25833 (ETRS89/UTMZone89) in Leaflet. If I am right Leaflet used as ...
astridx's user avatar
  • 615
3 votes
1 answer
462 views

Using a projection other than Mercator with proj4js 2.5 and OpenLayers 5.3

I am following the OpenLayers FAQ regarding the use of coordinate systems that do not rely on the infamous Mercator projection. I thus produced a very small HTML with a simple example that could be ...
Luís de Sousa's user avatar
2 votes
0 answers
1k views

Reprojecting British National Grid (27700) coords to Mercator (3857) using Proj4j

On epsg.io https://epsg.io/transform#s_srs=27700&t_srs=3857&x=327420.9886680&y=690284.5471100 the BNG easting/northing coodinates 327420.988668 690284.547110 reproject correctly to -352695....
gmh04's user avatar
  • 121
4 votes
3 answers
844 views

Using Proj4js with OpenLayers to transform lat lng from 4326 to 27700 but coming out unchanged

Using Proj4js to transform lat lng from 4326 to 27700 but coming out unchanged. I am using OpenLayers 2.12 (OS API Leisure map) EPSG 27700, Proj4js (CDN) I have added the definition to proj4 ...
spj_uk's user avatar
  • 83
0 votes
0 answers
312 views

Scaling WGS84 coordinates?

I know this is a weird question, but I would like to know if it is possible to construct a proj4 string so that I can use proj4 to convert from WGS84 to a "scaled" WGS84 system. For example with a ...
ortegren's user avatar
0 votes
1 answer
246 views

Problem on changing EPSG:3376 to EPSG:4326 using Proj4js

I been using the proj4js to transform the projection1 (EPSG::3376) to projection2 (EPSG::4326) with the data location of [66333, 170175] the outcome is supposed to be [110.281820983;1.5390299426] ...
Newb's user avatar
  • 1
4 votes
3 answers
2k views

Why is there a transformation shift/distortion of ~1.5km in OpenLayers 5.3.0 going from EPSG:4326 to EPSG:3857?

I have two features in plain WKT format, the source coordinates being in standard EPSG:4326 projection. I use these features to run some intersection operations, and I'm troubled by the fact that in ...
Eivind Rønnevik's user avatar
2 votes
0 answers
979 views

Specifying EPSG:31370 CRS in R Leaflet for WMS-service returns blank tiles

I am trying to load historical map tiles from a WMS-server (GetCapabilities) and display them using R Leaflet. Using the default CRS in Leaflet works fine, using e.g.: leaflet() %>% setView(4....
mhermans's user avatar
  • 335