esri / arcgis-to-geojson-utils Goto Github PK
View Code? Open in Web Editor NEWTools to convert ArcGIS JSON geometries to GeoJSON geometries and vice-versa.
License: Apache License 2.0
Tools to convert ArcGIS JSON geometries to GeoJSON geometries and vice-versa.
License: Apache License 2.0
why is npm run bundle
called for arcgis-to-geojson-utils
after its installed via the dependency here, but the same script is not run when the package is installed via the commandline?
$ npm install arcgis-to-geojson-utils
i haven't been able to figure out how to use the module when its still native ES6.
.npmignore
# for a tidy, compact npm release
test/
package-lock.json
*.zip
not ok 1 no plan found
not ok 2 no assertions found
see https://travis-ci.org/Esri/arcgis-to-geojson-utils/jobs/99338506
the error is the same as i saw locally prior to adding babelify --presets es2015
to the test script.
the same thing is happening to leaflet-virtual-grid
https://travis-ci.org/patrickarlt/leaflet-virtual-grid/builds/99176458
i feel like we need to configure another travis pre-install or configuration option, i just don't know what.
The maintained code here has been moved to:
We should notate this in the readme for this repository, do a release to https://www.npmjs.com/package/@esri/arcgis-to-geojson-utils (and https://www.npmjs.com/package/arcgis-to-geojson-utils ?) to make sure the readme note is on NPM too.
Optional: "Upgrade guide"? (example)
When I am generating ArcGIS JSON from any toolbox it will always have "features" and under that it will have "geometry" and attributes inside of it but this code is not doing that.
Also, "geometryType": "esriGeometryPolygon" these are the geometry tyoe which are also not coming as a part of json.
Sample ESRI JSON format(generated from features to json toolbox in ArcMap) is as below:
{
"displayFieldName": "",
"features": [
{
"attributes": {
"OBJECTID": 1,
"OutlineComment": "testoutline",
"ResourceID": "201",
"SHAPE_Area": 0.006233100233813974,
"SHAPE_Length": 0.4874967906258057
},
"geometry": {
"rings": [
[
[
-73.58145436999996,
-36.33218832299997
],
[
-73.52149838699995,
-36.295079320999946
],
[
-73.55052137699994,
-36.353603471999975
],
[
-73.52482963299997,
-36.43832287399994
],
[
-73.58145436999996,
-36.394054308999955
],
[
-73.59573113599998,
-36.37501862099998
],
[
-73.65474820399999,
-36.398347928999954
],
[
-73.60762844099997,
-36.336947244999976
],
[
-73.58145436999996,
-36.33218832299997
]
]
]
}
}
],
"fieldAliases": {
"OBJECTID": "OBJECTID",
"OutlineComment": "OutlineComment",
"ResourceID": "ResourceID",
"SHAPE_Area": "SHAPE_Area",
"SHAPE_Length": "SHAPE_Length"
},
"fields": [
{
"alias": "OBJECTID",
"name": "OBJECTID",
"type": "esriFieldTypeOID"
},
{
"alias": "ResourceID",
"length": 50,
"name": "ResourceID",
"type": "esriFieldTypeString"
},
{
"alias": "OutlineComment",
"length": 50,
"name": "OutlineComment",
"type": "esriFieldTypeString"
},
{
"alias": "SHAPE_Length",
"name": "SHAPE_Length",
"type": "esriFieldTypeDouble"
},
{
"alias": "SHAPE_Area",
"name": "SHAPE_Area",
"type": "esriFieldTypeDouble"
}
],
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"latestWkid": 4326,
"wkid": 4326
}
}
Also following is the JSON which arcgis - to - geojson-utils is generating:
now that @JeffJacobson has gotten his typings landed in DefinitelyTyped, lets make sure to promote them here.
module
field and files
array (to stop shipping cruft) to package.jsonHow to convert arcgis featureSet to geojson?
I understand this module only convert a single arcgis geometry to geojson,
However, the response from arcgis rest api, are NOT geometry,
instead, they are FeatureSet.
Can you add the function to convert arcgis FeatureSet to geojson?
The GeoJSON 2008 specification is obsoleted by the RFC 7946 GeoJSON specification back in August 2016.
I and many others would love to see an adoption of the RFC 7946 GeoJSON specification by ESRI.
Any plans of this?
Hi ,
I am setting up a typescript application and it's structure looks like this:
When I am running the application, I am getting this error:
I am not sure, how the code is trying to access the arcgis-to-geojson utils from ArcGIS JS API even when declaration files are mentioned in typings.d.ts
I am new to typescript and not sure if I am doing something wrong here.
Thanks and Regards,
Amruta
Hi,
There are 2 dependencies for @types/arcgis-to-geojson-utils:
@types/arcgis-rest-api
https://www.npmjs.com/package/%40types%2Farcgis-rest-api
@types/geojson
https://www.npmjs.com/package/%40types%2Fgeojson
I am working with project which is having Typescript version 2.2. and this version is kind of frozen for the project :(
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/geojson/index.d.ts
This file is giving error as it is using Typescript version 2.3
Can I get typings for 2.2 version anywhere? :(
As even '@types/arcgis-rest-api' is working fine on Ts version 2.2
Can anybody help? Where I can get 2.2 Typings?
Thanks and Regards,
Amruta
I am not sure what you want to do with this information, but in switching from Terraformer Parser I ran into the following unexpected change:
For this feature:
{
"attributes": {
"PROJ_DESC": "REMODEL FOR DRINK STATION ON FLOOR 3. C/C "
},
"geometry": {
"x": "NaN",
"y": "NaN"
}
}
Terraformer parser returns [Error: Unknown type: undefined]
Whereas this module returns {}
I know these are separate projects, but I thought you might want to be aware of this difference.
it took me a bit to figure out that the npm package is actually arcgis-to-geojson-utils
at a bare minimum the readme title, npm install
instructions, badge, code snippets, etc. need to be updated...
from https://github.com/Esri/arcgis-to-geojson-utils#usage
This package is distributed as a UMD module and can also be used in AMD based systems or as a global under the
ArcgisToGeojsonUtils
namespace.
apparently the note above doesn't make it clear enough that you don't have to build the lib yourself. lets add a code snippet too.
i can fix the readme, but only repo owners/admins can edit repo descriptions
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.