How can I get GeoJSON from Esri software to load in leaflet?How to get LatLng array from geoJSON Layer in...
Badly designed reimbursement form. What does that say about the company?
What does "don't have a baby" imply or mean in this sentence?
How can changes in personality/values of a person who turned into a vampire be explained?
Why is quixotic not Quixotic (a proper adjective)?
Can a planet be tidally unlocked?
The Longest Chess Game
What if you do not believe in the project benefits?
Why do we divide Permutations to get to Combinations?
How can I use a Module anonymously as the function for /@?
Can I legally make a website about boycotting a certain company?
Is it ethical to apply for a job on someone's behalf?
Identical projects by students at two different colleges: still plagiarism?
Are encryption algorithms with fixed-point free permutations inherently flawed?
How can I differentiate duration vs starting time
How do I add a strong "onion flavor" to the biryani (in restaurant style)?
How do I write a maintainable, fast, compile-time bit-mask in C++?
How to modify 'inter arma enim silent leges' to mean 'in a time of crisis, the law falls silent'?
How should I ship cards?
Given the mapping a = 1, b = 2, ... z = 26, and an encoded message, count the number of ways it can be decoded
Can a Hydra make multiple opportunity attacks at once?
Ramanujan's radical and how we define an infinite nested radical
Why Is Image Exporting At Larger Dimensions Than In Illustrator File?
Can you wish for more wishes from an Efreeti bound to service via an Efreeti Bottle?
Why is Shelob considered evil?
How can I get GeoJSON from Esri software to load in leaflet?
How to get LatLng array from geoJSON Layer in Leaflet?How do you load a GeoJSON file in Leaflet?Load external geojson file into leaflet mapHow to load GeoJSON from GeoServer to define a variable in Leaflet?Leaflet Marker Cluster from GeoJSONHow can I load GeoJSON from URL to leaflet?Can't load geoJSON files in Leaflet layer controlMarkerCluster don't work with geojson layer in leafletHow to remove features from a Leaflet GeoJSON layer?How can I update geojson properties using popup leaflet?
So I am trying to take a GeoJSON file that I have generated from an Esri shapefile in ArcGIS Pro, but it is not rendering on the map for some reason...
The GeoJSON that was created from ArcGIS Pro is here. I have included my current JavaScript below as well. I feel like there might be something wrong with the way the data is formatted or something, I don't really know, as I am unfamiliar with all of this. I left in some commented code that didn't seem to do anything differently, but maybe it can work if a small change is made.
$(document).ready(function () {
let map = L.map("map").setView([19.042805, -70.581183], 7.2);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
$.ajax({
dataType: "json",
url: "/static/yaque_del_norte_viewer/GeoJSON/yaque_del_norte.geojson",
success: function (data) {
console.log(data);
let myStyle = {
"color": "#2427ff",
"weight": 5,
"opacity": 0.65
};
L.geoJSON(data, {style: myStyle}).addTo(map);
// let yaqueDelNorteLayer = new L.GeoJSON();
//
// $(data.features).each(function (key, data) {
//
// console.log(data);
// yaqueDelNorteLayer.addData(data);
// });
// console.log(yaqueDelNorteLayer);
//
// yaqueDelNorteLayer.setStyle(myStyle);
//
// yaqueDelNorteLayer.addTo(map);
}
});
});
leaflet geojson arcgis-pro
New contributor
add a comment |
So I am trying to take a GeoJSON file that I have generated from an Esri shapefile in ArcGIS Pro, but it is not rendering on the map for some reason...
The GeoJSON that was created from ArcGIS Pro is here. I have included my current JavaScript below as well. I feel like there might be something wrong with the way the data is formatted or something, I don't really know, as I am unfamiliar with all of this. I left in some commented code that didn't seem to do anything differently, but maybe it can work if a small change is made.
$(document).ready(function () {
let map = L.map("map").setView([19.042805, -70.581183], 7.2);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
$.ajax({
dataType: "json",
url: "/static/yaque_del_norte_viewer/GeoJSON/yaque_del_norte.geojson",
success: function (data) {
console.log(data);
let myStyle = {
"color": "#2427ff",
"weight": 5,
"opacity": 0.65
};
L.geoJSON(data, {style: myStyle}).addTo(map);
// let yaqueDelNorteLayer = new L.GeoJSON();
//
// $(data.features).each(function (key, data) {
//
// console.log(data);
// yaqueDelNorteLayer.addData(data);
// });
// console.log(yaqueDelNorteLayer);
//
// yaqueDelNorteLayer.setStyle(myStyle);
//
// yaqueDelNorteLayer.addTo(map);
}
});
});
leaflet geojson arcgis-pro
New contributor
2
That GeoJSON says that it is defined in EPSG:4236 but the coordinates are clearly from a projected coordinate system. How did you save it? The coordinates should appear as latitude and longitude values.
– wfgeo
Feb 18 at 20:36
@wfgeo I'm not 100% sure how I saved it, I thought I input the parameter to output to WGS 1984, and that is probably the issue, huh?
– Wade
Feb 18 at 20:41
2
A coordinate string like[[237865.08519999962,1954470.2309000008],[240225.97360000014,1956308.3763999995]]
is clearly indicative of a projected coordinate system because the numbers are so large. A geographic CRS like WGS84 should have numbers within -180 to 180 and -360 to 360. Try saving it again but be very careful to go through every option to make sure everything is set to EPSG:4326.
– wfgeo
Feb 18 at 20:43
add a comment |
So I am trying to take a GeoJSON file that I have generated from an Esri shapefile in ArcGIS Pro, but it is not rendering on the map for some reason...
The GeoJSON that was created from ArcGIS Pro is here. I have included my current JavaScript below as well. I feel like there might be something wrong with the way the data is formatted or something, I don't really know, as I am unfamiliar with all of this. I left in some commented code that didn't seem to do anything differently, but maybe it can work if a small change is made.
$(document).ready(function () {
let map = L.map("map").setView([19.042805, -70.581183], 7.2);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
$.ajax({
dataType: "json",
url: "/static/yaque_del_norte_viewer/GeoJSON/yaque_del_norte.geojson",
success: function (data) {
console.log(data);
let myStyle = {
"color": "#2427ff",
"weight": 5,
"opacity": 0.65
};
L.geoJSON(data, {style: myStyle}).addTo(map);
// let yaqueDelNorteLayer = new L.GeoJSON();
//
// $(data.features).each(function (key, data) {
//
// console.log(data);
// yaqueDelNorteLayer.addData(data);
// });
// console.log(yaqueDelNorteLayer);
//
// yaqueDelNorteLayer.setStyle(myStyle);
//
// yaqueDelNorteLayer.addTo(map);
}
});
});
leaflet geojson arcgis-pro
New contributor
So I am trying to take a GeoJSON file that I have generated from an Esri shapefile in ArcGIS Pro, but it is not rendering on the map for some reason...
The GeoJSON that was created from ArcGIS Pro is here. I have included my current JavaScript below as well. I feel like there might be something wrong with the way the data is formatted or something, I don't really know, as I am unfamiliar with all of this. I left in some commented code that didn't seem to do anything differently, but maybe it can work if a small change is made.
$(document).ready(function () {
let map = L.map("map").setView([19.042805, -70.581183], 7.2);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
$.ajax({
dataType: "json",
url: "/static/yaque_del_norte_viewer/GeoJSON/yaque_del_norte.geojson",
success: function (data) {
console.log(data);
let myStyle = {
"color": "#2427ff",
"weight": 5,
"opacity": 0.65
};
L.geoJSON(data, {style: myStyle}).addTo(map);
// let yaqueDelNorteLayer = new L.GeoJSON();
//
// $(data.features).each(function (key, data) {
//
// console.log(data);
// yaqueDelNorteLayer.addData(data);
// });
// console.log(yaqueDelNorteLayer);
//
// yaqueDelNorteLayer.setStyle(myStyle);
//
// yaqueDelNorteLayer.addTo(map);
}
});
});
leaflet geojson arcgis-pro
leaflet geojson arcgis-pro
New contributor
New contributor
edited Feb 18 at 21:00
Vince
14.6k32748
14.6k32748
New contributor
asked Feb 18 at 19:59
WadeWade
1062
1062
New contributor
New contributor
2
That GeoJSON says that it is defined in EPSG:4236 but the coordinates are clearly from a projected coordinate system. How did you save it? The coordinates should appear as latitude and longitude values.
– wfgeo
Feb 18 at 20:36
@wfgeo I'm not 100% sure how I saved it, I thought I input the parameter to output to WGS 1984, and that is probably the issue, huh?
– Wade
Feb 18 at 20:41
2
A coordinate string like[[237865.08519999962,1954470.2309000008],[240225.97360000014,1956308.3763999995]]
is clearly indicative of a projected coordinate system because the numbers are so large. A geographic CRS like WGS84 should have numbers within -180 to 180 and -360 to 360. Try saving it again but be very careful to go through every option to make sure everything is set to EPSG:4326.
– wfgeo
Feb 18 at 20:43
add a comment |
2
That GeoJSON says that it is defined in EPSG:4236 but the coordinates are clearly from a projected coordinate system. How did you save it? The coordinates should appear as latitude and longitude values.
– wfgeo
Feb 18 at 20:36
@wfgeo I'm not 100% sure how I saved it, I thought I input the parameter to output to WGS 1984, and that is probably the issue, huh?
– Wade
Feb 18 at 20:41
2
A coordinate string like[[237865.08519999962,1954470.2309000008],[240225.97360000014,1956308.3763999995]]
is clearly indicative of a projected coordinate system because the numbers are so large. A geographic CRS like WGS84 should have numbers within -180 to 180 and -360 to 360. Try saving it again but be very careful to go through every option to make sure everything is set to EPSG:4326.
– wfgeo
Feb 18 at 20:43
2
2
That GeoJSON says that it is defined in EPSG:4236 but the coordinates are clearly from a projected coordinate system. How did you save it? The coordinates should appear as latitude and longitude values.
– wfgeo
Feb 18 at 20:36
That GeoJSON says that it is defined in EPSG:4236 but the coordinates are clearly from a projected coordinate system. How did you save it? The coordinates should appear as latitude and longitude values.
– wfgeo
Feb 18 at 20:36
@wfgeo I'm not 100% sure how I saved it, I thought I input the parameter to output to WGS 1984, and that is probably the issue, huh?
– Wade
Feb 18 at 20:41
@wfgeo I'm not 100% sure how I saved it, I thought I input the parameter to output to WGS 1984, and that is probably the issue, huh?
– Wade
Feb 18 at 20:41
2
2
A coordinate string like
[[237865.08519999962,1954470.2309000008],[240225.97360000014,1956308.3763999995]]
is clearly indicative of a projected coordinate system because the numbers are so large. A geographic CRS like WGS84 should have numbers within -180 to 180 and -360 to 360. Try saving it again but be very careful to go through every option to make sure everything is set to EPSG:4326.– wfgeo
Feb 18 at 20:43
A coordinate string like
[[237865.08519999962,1954470.2309000008],[240225.97360000014,1956308.3763999995]]
is clearly indicative of a projected coordinate system because the numbers are so large. A geographic CRS like WGS84 should have numbers within -180 to 180 and -360 to 360. Try saving it again but be very careful to go through every option to make sure everything is set to EPSG:4326.– wfgeo
Feb 18 at 20:43
add a comment |
1 Answer
1
active
oldest
votes
I checked a bit what projected CRS might be used in geojson file. Since Yaque del Norte is a river in Dominican Republic, I asumed that CRS is EPSG:32619
which covers Dominican Republic.
Using Proj4Leaflet
plugin I unprojected coordinates in geojson object. Resultant features (rivers) exctly cover Dominican Republic.
Code can be something like:
var epsg32619 = new L.Proj.CRS('EPSG:32619',
'+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs',
{
origin: [166021.44, 9329005.18],
resolutions: [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5],
}
);
L.geoJSON(data, {
style: myStyle,
coordsToLatLng: function (coords) {
return epsg32619.unproject(L.point(coords));
}
).addTo(map);
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Wade is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f312679%2fhow-can-i-get-geojson-from-esri-software-to-load-in-leaflet%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I checked a bit what projected CRS might be used in geojson file. Since Yaque del Norte is a river in Dominican Republic, I asumed that CRS is EPSG:32619
which covers Dominican Republic.
Using Proj4Leaflet
plugin I unprojected coordinates in geojson object. Resultant features (rivers) exctly cover Dominican Republic.
Code can be something like:
var epsg32619 = new L.Proj.CRS('EPSG:32619',
'+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs',
{
origin: [166021.44, 9329005.18],
resolutions: [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5],
}
);
L.geoJSON(data, {
style: myStyle,
coordsToLatLng: function (coords) {
return epsg32619.unproject(L.point(coords));
}
).addTo(map);
add a comment |
I checked a bit what projected CRS might be used in geojson file. Since Yaque del Norte is a river in Dominican Republic, I asumed that CRS is EPSG:32619
which covers Dominican Republic.
Using Proj4Leaflet
plugin I unprojected coordinates in geojson object. Resultant features (rivers) exctly cover Dominican Republic.
Code can be something like:
var epsg32619 = new L.Proj.CRS('EPSG:32619',
'+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs',
{
origin: [166021.44, 9329005.18],
resolutions: [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5],
}
);
L.geoJSON(data, {
style: myStyle,
coordsToLatLng: function (coords) {
return epsg32619.unproject(L.point(coords));
}
).addTo(map);
add a comment |
I checked a bit what projected CRS might be used in geojson file. Since Yaque del Norte is a river in Dominican Republic, I asumed that CRS is EPSG:32619
which covers Dominican Republic.
Using Proj4Leaflet
plugin I unprojected coordinates in geojson object. Resultant features (rivers) exctly cover Dominican Republic.
Code can be something like:
var epsg32619 = new L.Proj.CRS('EPSG:32619',
'+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs',
{
origin: [166021.44, 9329005.18],
resolutions: [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5],
}
);
L.geoJSON(data, {
style: myStyle,
coordsToLatLng: function (coords) {
return epsg32619.unproject(L.point(coords));
}
).addTo(map);
I checked a bit what projected CRS might be used in geojson file. Since Yaque del Norte is a river in Dominican Republic, I asumed that CRS is EPSG:32619
which covers Dominican Republic.
Using Proj4Leaflet
plugin I unprojected coordinates in geojson object. Resultant features (rivers) exctly cover Dominican Republic.
Code can be something like:
var epsg32619 = new L.Proj.CRS('EPSG:32619',
'+proj=utm +zone=19 +datum=WGS84 +units=m +no_defs',
{
origin: [166021.44, 9329005.18],
resolutions: [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0.5],
}
);
L.geoJSON(data, {
style: myStyle,
coordsToLatLng: function (coords) {
return epsg32619.unproject(L.point(coords));
}
).addTo(map);
answered 11 mins ago
TomazicMTomazicM
1,021216
1,021216
add a comment |
add a comment |
Wade is a new contributor. Be nice, and check out our Code of Conduct.
Wade is a new contributor. Be nice, and check out our Code of Conduct.
Wade is a new contributor. Be nice, and check out our Code of Conduct.
Wade is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f312679%2fhow-can-i-get-geojson-from-esri-software-to-load-in-leaflet%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
That GeoJSON says that it is defined in EPSG:4236 but the coordinates are clearly from a projected coordinate system. How did you save it? The coordinates should appear as latitude and longitude values.
– wfgeo
Feb 18 at 20:36
@wfgeo I'm not 100% sure how I saved it, I thought I input the parameter to output to WGS 1984, and that is probably the issue, huh?
– Wade
Feb 18 at 20:41
2
A coordinate string like
[[237865.08519999962,1954470.2309000008],[240225.97360000014,1956308.3763999995]]
is clearly indicative of a projected coordinate system because the numbers are so large. A geographic CRS like WGS84 should have numbers within -180 to 180 and -360 to 360. Try saving it again but be very careful to go through every option to make sure everything is set to EPSG:4326.– wfgeo
Feb 18 at 20:43