1

I have a geojson file I cannot seem to convert to X, Y coordinates.

I've tried ogr2ogr and QGIS, with no luck.

Is there a better way to do this in QGIS than to just save the vector layer with the Mercator projection?

I'm also using the ogr2ogr conversion command:

ogr2ogr -f geoJSON -t_srs EPSG:3078 bay_test.geojson bay.geojson

Have also tried to Mercator.

The file is of Bay County, in Michigan.

A feature in the file looks like this:

"features": [
{ "type": "Feature", "properties": { "OBJECTID": 1, "PRECINCTID": "10", "NAME": "Auburn Precinct 1", "COUNTY": "017", "POP2010": 2087, "CODIST": "3", "SLDIST": "098", "SSDIST": "31", "LOCLDIST": "City of Auburn", "CONGDIST": "05", "SHAPE_area": 29419528.992700, "SHAPE_len": 27298.747018 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 13202130.235438145697117, 769367.830145135521889 ], [ 13202142.064482729882002, 769367.802668161690235 ], [ 13202475.064554918557405, 769367.802668161690235 ], [ 13203430.033937625586987, 769357.131757743656635 ], [ 13203423.967676792293787, 768206.876922428607941 ], [ 13203423.440282836556435, 768106.878762848675251 ], [ 13203423.132294606417418, 768048.379864096641541 ], [ 13203423.061756689101458, 768035.08018597215414 ], [ 13203422.912888877093792, 768006.879783056676388 ], [ 13203422.890333145856857, 767802.476074412465096 ], [ 13203423.142547208815813, 767421.395799823105335 ], [ 13203423.357441794127226, 767095.123486489057541 ], [ 13203423.416086688637733, 767005.123666495084763 ], [ 13203423.419777628034353, 767000.12408659607172 ], [ 13203423.486624605953693, 766900.124286599457264 ], [ 13203423.575617209076881, 766765.123736388981342 ], [ 13203422.826356898993254, 766716.983658783137798 ], [ 13203422.805441584438086, 766715.631135240197182 ], [ 13203572.713278252631426, 766713.318557843565941 ], [ 13203717.769582625478506, 766711.081029511988163 ], [ 13203717.021142523735762, 766663.304714307188988 ], [ 13203715.300345439463854, 766552.818550765514374 ], [ 13203640.302956063300371, 766553.538693681359291 ], [ 13203636.628422729671001, 766317.566806703805923 ], [ 13203416.638295125216246, 766319.678843155503273 ], [ 13203418.81061689555645, 765390.144530974328518 ], [ 13204729.538392417132854, 765363.362678363919258 ], [ 13204728.40568470954895, 765105.912405870854855 ], [ 13204726.962118044495583, 764777.741310238838196 ], [ 13204726.337119292467833, 764364.035198681056499 ], [ 13202826.129715647548437, 764407.01657596975565 ], [ 13202174.807609502226114, 764602.260197952389717 ], [ 13202096.283324293792248, 764602.996745035052299 ], [ 13202094.820072624832392, 764603.010688573122025 ], [ 13202092.874128356575966, 764357.352551281452179 ], [ 13202091.297687940299511, 764287.025428161025047 ], [ 13202091.297687940299511, 764215.150161802768707 ], [ 13202091.075001377612352, 764130.272132739424706 ], [ 13201568.117549918591976, 764133.961839929223061 ], [ 13201027.11961616948247, 764133.721518889069557 ], [ 13200886.715943563729525, 764133.659593157470226 ], [ 13200756.618598774075508, 764133.600948266685009 ], [ 13200441.750462107360363, 764133.461512848734856 ], [ 13200240.879390750080347, 764133.254410244524479 ], [ 13199503.968134917318821, 764133.044436909258366 ], [ 13199330.472747, 764132.96733732521534 ], [ 13198086.666179500520229, 764132.415337115526199 ], [ 13197635.960470020771027, 764132.214796178042889 ], [ 13197345.960229814052582, 764132.086433574557304 ], [ 13197318.559530023485422, 764132.074130453169346 ], [ 13196981.067997, 764138.509074926376343 ], [ 13196753.504065647721291, 764142.848387114703655 ], [ 13196753.602080542594194, 764299.525813266634941 ], [ 13196754.543679710477591, 764369.306677639484406 ], [ 13196756.914902, 764596.912849724292755 ], [ 13196774.349250335246325, 765197.650657430291176 ], [ 13196779.811837833374739, 766027.051475659012794 ], [ 13196781.971856482326984, 766354.973227947950363 ], [ 13196787.315513771027327, 766767.027029827237129 ], [ 13196812.356064084917307, 767972.576209932565689 ], [ 13196813.46580595895648, 768026.01073232293129 ], [ 13196813.613443460315466, 768046.907180033624172 ], [ 13196813.800450958311558, 768057.964408576488495 ], [ 13196815.074234500527382, 768137.128046177327633 ], [ 13198518.999222315847874, 768151.199540346860886 ], [ 13201946.287315230816603, 768144.630901910364628 ], [ 13201946.470221690833569, 768231.09685430675745 ], [ 13201946.370156273245811, 768237.854140661656857 ], [ 13201945.876800958067179, 768271.098414719104767 ], [ 13201946.738839916884899, 768471.095964200794697 ], [ 13201946.884837, 768537.095258057117462 ], [ 13201946.899600751698017, 768543.851314097642899 ], [ 13201947.072664711624384, 768622.094677947461605 ], [ 13201947.080046586692333, 768628.850323885679245 ], [ 13201947.24941960722208, 768787.811210036277771 ], [ 13201878.367093458771706, 768788.51043763756752 ], [ 13201885.167440749704838, 768968.888603784143925 ], [ 13201885.586567208170891, 768980.015550032258034 ], [ 13201951.206514708697796, 768980.963710866868496 ], [ 13201946.259428147226572, 769061.447473786771297 ], [ 13201952.458972834050655, 769119.279543161392212 ], [ 13201951.402134396135807, 769368.247631177306175 ], [ 13202084.23569418862462, 769367.938002534210682 ], [ 13202103.798893250524998, 769367.89207086712122 ], [ 13202130.235438145697117, 769367.830145135521889 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": 2, "PRECINCTID": "100", "NAME": "Bay City Ward 1", "COUNTY": "017", "POP2010": 3891, "CODIST": "6", "SLDIST": "096", "SSDIST": "31", "LOCLDIST": "Bay City Ward 1", "CONGDIST": "05", "SHAPE_area": 46265705.364600, "SHAPE_len": 31484.358680 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 13258237.231163565069437, 767117.008695349097252 ], [ 13258237.466973461210728, 767097.244545243680477 ], [ 13258302.928620751947165, 767097.73174899071455 ], [ 13258321.791361898183823, 767097.872004620730877 ], [ 13258310.674668252468109, 767051.611844509840012 ], [ 13258301.984971065074205, 766962.496209099888802 ], [ 13258268.138664085417986, 766615.40946888923645 ], [ 13258258.279349815100431, 766513.524420037865639 ], [ 13258248.45981564745307, 766412.238943472504616 ], [ 13258245.694073148071766, 766390.981193989515305 ], [ 13258295.675518460571766, 766386.965043887495995 ], [ 13259018.573925022035837, 766301.932815656065941 ], [ 13259636.4389130435884, 766235.174829095602036 ], [ 13259677.006007105112076, 766234.78646045178175 ], [ 13259786.585840437561274, 766215.228182636201382 ], [ 13259785.881691586226225, 766177.944382533431053 ], [ 13259570.523690544068813, 764067.402343787252903 ], [ 13259566.489495854824781, 764021.862326599657536 ], [ 13259528.256714709103107, 764025.778001181781292 ], [ 13259137.051378354430199, 764069.854766704142094 ], [ 13258665.068644501268864, 764824.973417222499847 ], [ 13258586.922065231949091, 764830.807148993015289 ], [ 13258515.602079916745424, 764838.973553262650967 ], [ 13258212.634345959872007, 764847.262578681111336 ], [ 13258045.576773252338171, 764889.591070137917995 ], [ 13257917.072683148086071, 764893.97631399333477 ], [ 13257838.060373980551958, 764903.324638471007347 ], [ 13257088.280049398541451, 764986.199308678507805 ], [ 13256957.121355023235083, 765035.266221702098846 ], [ 13256965.275456167757511, 764674.016123995184898 ], [ 13255656.081470232456923, 764797.493567325174809 ], [ 13255188.076746791601181, 764848.509705454111099 ], [ 13254836.186866585165262, 764892.842786073684692 ], [ 13254537.968138877302408, 764923.835178159177303 ], [ 13254268.929963044822216, 764946.425356075167656 ], [ 13254008.528991065919399, 764976.34614597260952 ], [ 13253741.636890333145857, 765002.014975868165493 ], [ 13253373.432656273245811, 765038.570020869374275 ], [ 13253102.967317938804626, 765063.35343586653471 ], [ 13252853.496442209929228, 765090.839027218520641 ], [ 13252584.62435856461525, 765117.491697013378143 ], [ 13252328.09518002346158, 765145.087606385350227 ], [ 13251971.12780012562871, 765176.604521699249744 ], [ 13251693.37737137824297, 765209.941069200634956 ], [ 13251412.299357417970896, 765232.233511492609978 ], [ 13251115.107940647751093, 765267.134196281433105 ], [ 13250834.92600429430604, 765295.788584515452385 ], [ 13250555.255057729780674, 765326.467657014727592 ], [ 13250413.284377105534077, 765341.271187119185925 ], [ 13250256.155016168951988, 765352.727857120335102 ], [ 13250093.86531450226903, 765368.9897176399827 ], [ 13249958.032662939280272, 765380.238054722547531 ], [ 13249815.906142730265856, 765397.208165138959885 ], [ 13249676.017971064895391, 765409.854547329246998 ], [ 13249394.475309085100889, 765435.242045760154724 ], [ 13248805.143318459391594, 765488.383753784000874 ], [ 13248950.055266167968512, 766229.780728995800018 ], [ 13249498.998558044433594, 767401.473759613931179 ], [ 13249600.300028666853905, 767682.26757138967514 ], [ 13250859.606893252581358, 769220.787296183407307 ], [ 13254182.835154917091131, 770491.842414826154709 ], [ 13254394.742539502680302, 770509.613048575818539 ], [ 13254449.703059501945972, 770508.858456909656525 ], [ 13256654.573157627135515, 770478.570213682949543 ], [ 13258243.384366482496262, 770460.90210597217083 ], [ 13258242.037174291908741, 770028.972605660557747 ], [ 13258241.489685229957104, 769770.2994025349617 ], [ 13258241.354350857436657, 769708.398689724504948 ], [ 13258240.7982496060431, 769446.294965244829655 ], [ 13258240.579253979027271, 769342.263431176543236 ], [ 13258236.438842315226793, 769240.01297951489687 ], [ 13258236.465088982135057, 769177.97201107442379 ], [ 13258236.486414398998022, 769128.1619893014431 ], [ 13258236.507739815860987, 769077.971800968050957 ], [ 13258236.529475335031748, 769027.971900969743729 ], [ 13258236.551210854202509, 768977.971590869128704 ], [ 13258236.562693770974874, 768950.971152745187283 ], [ 13258236.577047418802977, 768917.971300765872002 ], [ 13258236.635282211005688, 768772.971590764820576 ], [ 13258239.21278689801693, 768702.854851074516773 ], [ 13258239.171776480972767, 768669.984592013061047 ], [ 13258237.231163565069437, 767117.008695349097252 ] ] ] } },
{ "type": "Feature", "properties": { "OBJECTID": 6, "PRECINCTID": "220", "NAME": "Bay City Ward 5", "COUNTY": "017", "POP2010": 3874, "CODIST": "5", "SLDIST": "096", "SSDIST": "31", "LOCLDIST": "Bay City Ward 5", "CONGDIST": "05", "SHAPE_area": 27569269.439300, "SHAPE_len": 30014.328865 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 13253241.988529399037361, 757185.71909274160862 ], [ 13253241.353278044611216, 757150.795442119240761 ], [ 13253252.599154502153397, 756829.817163474857807 ], [ 13253256.853985231369734, 756460.338735766708851 ], [ 13253261.803532417863607, 756054.81256190687418 ], [ 13254584.439502626657486, 756060.889895558357239 ], [ 13254586.634790230542421, 755874.401587426662445 ], [ 13254586.874701168388128, 755860.490443989634514 ], [ 13254587.089185647666454, 755835.8042236790061 ], [ 13255902.009045958518982, 755817.127259723842144 ], [ 13255907.987134397029877, 755533.912603057920933 ], [ 13255927.07297220826149, 754675.538335554301739 ], [ 13255929.464289605617523, 754519.147982329130173 ], [ 13254749.593781895935535, 754519.891911283135414 ], [ 13254689.544689398258924, 754521.788232952356339 ], [ 13253336.90795898064971, 754527.172900661826134 ], [ 13253305.457480542361736, 754520.101884618401527 ], [ 13253308.178111586719751, 754379.400066286325455 ], [ 13253330.312663771212101, 753509.600706808269024 ], [ 13253334.166412625461817, 753290.210561595857143 ], [ 13253359.521922938525677, 753222.367849513888359 ], [ 13252446.743236690759659, 753228.988161079585552 ], [ 13251386.103543668985367, 753222.81281253695488 ], [ 13251238.819143354892731, 753224.405657120049 ], [ 13250763.372669711709023, 753221.027218990027905 ], [ 13250767.342478044331074, 752796.17693680524826 ], [ 13250770.795145023614168, 752426.723935551941395 ], [ 13250774.126831270754337, 752070.162968888878822 ], [ 13250778.391094397753477, 751613.80684419721365 ], [ 13250786.028464294970036, 750965.058961905539036 ], [ 13250797.54747012630105, 750395.982016079127789 ], [ 13250803.499722, 750022.605138160288334 ], [ 13250544.73301512748003, 750121.509960032999516 ], [ 13249743.228712625801563, 750440.380713365972042 ], [ 13249538.330418355762959, 750521.72815565764904 ], [ 13248662.782218668609858, 750873.880502536892891 ], [ 13248672.874472104012966, 751530.076286599040031 ], [ 13248675.926057208329439, 751710.356437847018242 ], [ 13248677.821148563176394, 752137.816212847828865 ], [ 13248674.692463874816895, 752502.208528682589531 ], [ 13248678.30794221162796, 752860.055992119014263 ], [ 13248680.046783875674009, 753228.797052532434464 ], [ 13248682.868300542235374, 753630.773774825036526 ], [ 13248687.187927730381489, 753982.800219722092152 ], [ 13248692.283472, 754206.416078262031078 ], [ 13248691.080226376652718, 754336.70125076174736 ], [ 13248696.363598354160786, 754687.042987741529942 ], [ 13248848.018478773534298, 754687.204158678650856 ], [ 13248979.976876273751259, 754687.344414308667183 ], [ 13249375.294327106326818, 754686.552503161132336 ], [ 13249369.637760333716869, 755041.069100558757782 ], [ 13249355.656899187713861, 755394.90820586681366 ], [ 13249354.472928460687399, 755659.730510868132114 ], [ 13249351.566110126674175, 755699.78333430737257 ], [ 13249352.0652068965137, 755759.946435764431953 ], [ 13249322.390069399029016, 755759.141401283442974 ], [ 13249303.78610398247838, 756113.710492014884949 ], [ 13249299.612883981317282, 756468.355041906237602 ], [ 13249291.039246272295713, 756820.408553682267666 ], [ 13249281.06059169024229, 757171.51718544960022 ], [ 13249457.612075854092836, 757168.312221385538578 ], [ 13249743.8200828358531, 757171.37487930804491 ], [ 13249990.204924710094929, 757168.121522948145866 ], [ 13250188.220440752804279, 757162.393187947571278 ], [ 13250349.357749711722136, 757160.476361073553562 ], [ 13250613.583353146910667, 757163.89334899187088 ], [ 13251124.00884148105979, 757173.406125240027905 ], [ 13251120.621381063014269, 757519.568490661680698 ], [ 13251397.915363878011703, 757524.182572640478611 ], [ 13251680.946703981608152, 757536.379070557653904 ], [ 13251963.560558043420315, 757542.964523263275623 ], [ 13251959.210993252694607, 757889.849492222070694 ], [ 13251957.128484293818474, 757907.264565661549568 ], [ 13251958.982975333929062, 758042.698595970869064 ], [ 13252246.747737731784582, 758047.208511494100094 ], [ 13252538.462623458355665, 758049.804060764610767 ], [ 13252816.106425125151873, 758052.564471907913685 ], [ 13253236.797430854290724, 758061.878347635269165 ], [ 13253235.72787918895483, 757905.1303835734725 ], [ 13253243.356226794421673, 757625.134224407374859 ], [ 13253241.988529399037361, 757185.71909274160862 ] ] ] } },

2 Answers 2

5

Luckily, your data has enough information to identify its location (Bay City, Michigan). Checking the various coordinate reference systems used in Michigan, it looks like the data is using the Michigan South State Plane zone (international feet). The geographic CRS is impossible to identify beyond that it's NAD 1983 or one of its re-adjustments/realizations.

Try EPSG::2253 (NAD 1983) or EPSG::2898 (NAD 1983 HARN)

3
  • Thank you. I'm still trying and failing. I used this command for either projections: ogr2ogr -f geoJSON -t_srs EPSG:2898 bay_test.geojson bay.geojson but it fails. Says: Failed to reproject feature 0 (geometry probably out of source or destination SRS). ERROR 1: Terminating translation prematurely after failed translation of layer OGRGeoJSON (use -skipfailures to skip errors) Nov 16, 2016 at 1:06
  • I don't know qgis. Add the details of what you're doing to the question.
    – mkennedy
    Nov 16, 2016 at 1:07
  • OK. That's a command line though. But will update. Nov 16, 2016 at 1:08
2

You have to specify EPSG:2898 as source CRS, so use -s_srs EPSG:2898 -t_srs EPSG:4326 to convert from that to lonlat degrees on the command line.

In QGIS, use Set Layer CRS, to set the data to the corrrect CRS before saving the layer to some other CRS with Save As ....

You can always load an Openstreetmap background layer with the QuickMapServices plugin to see if your data is placed correctly:

enter image description here

If the data appears on a wrong spot on Earth, reprojecting won't help, only correcting the layer's CRS will do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.