Giter Club home page Giter Club logo

arcgis-to-geojson-utils's Issues

ArcGIS JSON structure is not getting formed

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:

image

How to convert arcgis featureSet to geojson?

How 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?

Not able to use arcgis-to-geojson-utils Typings successfully

Hi ,
I am setting up a typescript application and it's structure looks like this:
image

Typings file looks like this:
image

Package.json looks like this:
image

When I am running the application, I am getting this error:
image

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

Need help with 2.2 version Typings

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

Unexpected difference from Terraformer Parser

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"
  }
}

Found in the wild

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.

rename repository to arcgis-to-geojson-utils?

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.