What format is the coordinate of this geojson example - geojson

I have this geojson for bike paths and I can't seem to figure out what the coordinates represents. I was expecting longitude and latitude, but those doesn't seem to be it.
Here is an example:
"geometry":{
"type":"LineString",
"coordinates":[
[
305049.6192401955,
5061761.891977313
],
[
305038.71863293805,
5061778.694289856
]
]
}
The source of data can be found here : bike path data
Unfortunately, it is only in french, but the data is under geojson section then click on "Explorer/Aller a la ressource"
Any help is appreciated,
Cheers,

Your data uses this spatial reference system: EPSG:2950, also known as: "NAD83(CSRS) / MTM zone 8". The units in this system is meters.
This information can be found at the top of your geojson file here:
"name": "urn:ogc:def:crs:EPSG::2950"
The crs stands for coordinate reference system (And for the trivia value, EPSG stands for "European Petroleum Survey Group").
This is likely confirmed by the shapefile from the same data source (based on your link), the .prj file states:
PROJCS["Ontario_MTM_Zone_8_east_of_75_degrees_W_NAD_83_datum"
The MTM refers to Modified Transverse Mercator. If you want to easily convert this data (unproject it essentially) to WGS84 to get longitude latitude pairs, you could download the shapefile, unzip it, and add all files to mapshaper.org, open the console and enter proj wgs84 and then export as a geosjon (or topojson).

Related

Locating GPS locations using GeoJSON

I've got a GeoJSON file of administrative borders i.e. state and county, and a CSV file with 12,500+ named GPS coordinates located within the geographic area.
My boss wants me to use the GeoJSON identify the county for each GPS location so I ended up with a CSV file (format) like;
LOCNAME, LOCLONG, LOCLAT, COUNTY, STATE
Is there any tool that can do this?
Thanks a bunch.
You may use QGIS to do this. You may import your geojson polygon file and import the csv containing coordinates as a point layer.
Follow the tutorial here: http://www.qgistutorials.com/en/docs/points_in_polygon.html

Change map projection in Cesium.js to match results from turf.js inside query

I am displaying a point and a polygon in Cesium.js, and using turf.js to check is the point inside the polygon.
When displayed in Cesium (or geojson.io), the point is clearly outside the polygon, as can be seen here:
http://geojson.io/#id=gist:kujosHeist/1030e392bd751daf5d9af57aa412a49c&map=3/46.80/-22.76
However, when I queried this on the turf.js issiues page:
https://github.com/Turfjs/turf-inside/issues/15
I was told it was because geojson, (and therefore Cesium) is "misrepresenting the point since it uses World Web Mercator projection (EPSG:3857)" and that "viewing the same point/polygon using WGS84 with QGIS" ...shows the point is inside the polygon.
So my question is: How can I change the map projection used in Cesium (and also in geojson.io if possible), so that the point is correctly displayed inside the polygon?
I am not sure how well geojson.io or Cesium will handle different coordinate systems, but you can specify a CRS element in your GeoJSON that indicates the coordinate system used by points of your features. This is added as a member under your feature collection. For example:
{
{
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
},
...the rest of your structure...
}
But like I said, it's up to the map display software to pay attention to your specified CRS and use it to project coords. If it doesn't support the coordinate system you have, then you'll need to pick some other map display software or convert the coords to a supported coordinate system.

What kind of coordinates are these numbers?

I have geo data, that contain X field like: 1012532,749 and Y field like: 178774,7655. This data from the shapefile format, but I don`t know in what GEO standart this data is.
Maybe someone know, or can show me the way to find out, how translate this coords in GPS.
From your comment the situation is clear:
You got an invalid shape file:
The prj file states WGS84 coordinates in decimal degrees
which has range: (longitude(x) [-180-.0, 180.0], latitude(y): [-90.0, 90.0].
But the coordinates posted are not in valid range.
The prj definition does not fit to the rest of the shape files (your posted coordinate).
(This happens because the prj file is optional, and has probably the default settings of some other project)
There is little chance of knowing, without further knowlegde.
Simply ask the data provider which geographical datum (name) the coordinates are related to. Further you should claim, that the file is erorrnous and that they should provide a correct prj file (or remove the prj file, if the coordinates are not related to world coordinates)
IF you know the source, e.g the swiss "Landesvermessung" then you could think it is for example a "Swiss Grid CH1903+ / LV95" grid system. (This was an example, the coordinates are not in that Swiss grid)
But it does not make sense to reverse engineer that, just ask the data provider, or if appliable read the info where you have got that data from.

Converting from Albers to GPS coordinates

I have some coordinate data and the only thing i know about its coordinate system is the
following description:
PROJCS["Basic Albers NAD83",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137.0,298.257222101]
],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]
],
PROJECTION["Albers"],
PARAMETER["False_Easting",0.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-96.0],
PARAMETER["Standard_Parallel_1",45.5],
PARAMETER["Standard_Parallel_2",29.5],
PARAMETER["Latitude_Of_Origin",23.0],
UNIT["Foot_US",0.3048006096012192]
]
this comes from a prj arcGis file.
I need to convert from this system to GPS (Google maps) system and vice-versa.
this must be done programatically and i cannot use esri libraries (license issues)...
Could you explain the meaning of all these parameters?
are the coordinates expressed in the spheroid and the projection (albers) used only when drawing
the map? or the coordinates depend on the projection used also?
Do you know an open source library I could use for this transformation?
Thanks!
All these parameters define the projection, including:
Projection type (Albers)
GEOGCS defines the geoid (idealized Earth shape) used by the project. In this case, it's NAD83, which uses degrees for units and is centered at the Greenwich, the 0th longitude.
Where the projection itself is centered
How far the projection is moved north and east to make any negative coordinates
positive (False Easting and False Northing)
Units for coordinates in this projection (US Feet)
Some other information about how coordinates of the projection were transformed to be drawn on a flat service.
I have a blog post which goes over the details for an OGC WKT definition, which is very similar to the content in an ESRI .prj file: http://www.dev-garden.org/2011/07/30/projections-for-programmers-one-projection/. You may find it useful.
With projected coordinates, they have already been 'drawn on the map', and you need to reproject them to use in other coordinate systems like Google's projection.
There are many open source tools you can use to reproject your coordinates from one projected system to another. Here are a few:
Geotools or Proj4j - Java
Proj4js - Javascript
Proj - C or C++
dotspatial - C#
One command line tool I find very useful is ogr2ogr. Using ogr2ogr, it is very easy to reproject coordinates from one system to another. Here's how to convert a projected shapefile to a Google Earth projection:
ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:3857 NEWFILE.shp OLDFILE.shp
Ogr2ogr uses the .prj file to determine the current projection of the shapefile, and then reprojects it to Googles projection, defined here by the EPSG shorthand EPSG:3857. You can find ogr2ogr for Windows and other platforms at http://fwtools.maptools.org/

British National Grid Shapefile - convert to WGS84 Lat/Lon

I have a set of ESRI shapefiles which, I'm told, have been written using the British National Grid coordinate system. I need to convert these files to WGS84 lat/lons, for onward conversion to KML files. I'm having trouble doing this as follows:
If I open each of the original files in MapInfo Professional telling it that my file has a projection which is British National Grid then I can't see any geographic objects in the file; the map window is completely empty.
If I use MapInfo Professional's Universal Translator to convert the files to a WGS84 MapInfo TAB file then, just as before, the converted file won't display any geographic objects, the MapInfo window is empty.
Can I verify the coordinate system of these files? Am I missing anything here? Should I be able to convert the shapefiles in the way I'm expecting to be able to and view them using MapInfo Professional? Will another tool do a better job for me?
Thanks.
More Info:
My shapefile has coordinates which don't seem to translate to lat/lon properly and I'm now wondering if the coordinates aren't actually British National Grid. I'm seeing coordinates such as 383702523, 399081141 which appears to be approximately lat/lon 53.488182, -2.247153. Have you any idea what projection system my input file is in?
OS grid doesn't use WGS84 - it uses Airy 1936 (OSGB36) spheroid
So you need to go from OSgrid -> lat/lon then OSGB36->WGS84.
See http://www.ordnancesurvey.co.uk/oswebsite/gps/docs/convertingcoordinatesEN.pdf
To do OS grid to lat-lon see http://www.movable-type.co.uk/scripts/latlong-gridref.html
Then to go from OSGB36 -> WGS84 see http://www.movable-type.co.uk/scripts/latlong-convert-coords.html
http://gothos.info/2009/04/14/transform-projections-with-gdal-ogr/
ogr2ogr is a great tool for doing these sorts of conversions. You would run it with a command like
ogr2ogr -t_srs EPSG:4326 map_wgs84.shp map_original.shp
-t_srs is the option to transform co-ordinate systems. 4326 is the EPSG SRID for WGS84.

Resources