Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning #28

Open
micbrenn opened this issue Apr 21, 2017 · 2 comments
Open

DeprecationWarning #28

micbrenn opened this issue Apr 21, 2017 · 2 comments

Comments

@micbrenn
Copy link

micbrenn commented Apr 21, 2017

I am new to Node.js, and have very limited knowledge of coding. That being said, I am attempting to use AGStoSHP to create a shapefile from a WMS service layer for use in ArcMap. I am under the impression that this tool will allow me to accomplish this, but please correct me if I am wrong. Let me briefly explain the process that I have gone through.


  • I first installed Python 3.6.1 amd64 on my 64-bit windows machine. Since then, I have realized that Python 2.7 is already installed, which is the version that Arc is using. I have not yet tried installing GDAL with Python 2.7.

  • I then installed GDAL 2.1.3 amd64, following the instructions here: ( https://sandbox.idre.ucla.edu/sandbox/tutorials/installing-gdal-for-windows ).

  • I then installed Node.js 6.10.2 (x64) with npm. I have also tried using version 7.9.0, which didn't work either.

  • After downloading the 'AGStoShapefile-master' and saving it to my Documents folder, I edited the 'services.txt', leaving only my service ( http://sig.se.gob.ar/cgi-bin/mapserv6|planosbase_puntos_caracteristicos ).

  • I then opened the Node.js command prompt, navigated to the AGStoShapefile-master folder, and entered the following :

node agstoshp.js services.txt ./output/

  • Here is the output that was returned:

(node:9444) DeprecationWarning: process.EventEmitter is deprecated. Use require('events') instead.
C:\Users\kzx318\Documents\AGStoShapefile-master\AGStoShapefile-master\agstoshp.js:71
objectIds.sort();
^

TypeError: Cannot read property 'sort' of undefined
at requestService (C:\Users\kzx318\Documents\AGStoShapefile-master\AGStoShapefile-master\agstoshp.js:71:11)
at Request._callback (C:\Users\kzx318\Documents\AGStoShapefile-master\AGStoShapefile-master\agstoshp.js:64:4)
at Request.self.callback (C:\Users\kzx318\Documents\AGStoShapefile-master\AGStoShapefile-master\node_modules\request\request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (C:\Users\kzx318\Documents\AGStoShapefile-master\AGStoShapefile-master\node_modules\request\request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (C:\Users\kzx318\Documents\AGStoShapefile-master\AGStoShapefile-master\node_modules\request\request.js:1091:12)
at IncomingMessage.g (events.js:291:16)


Like I said before, my knowledge is limited, but I can follow if told where to go, what to look for and what to change. Any help that anyone could provide would be extremely appreciated.

@kawikakanaka
Copy link

Hi micbrenn,
I got a 404 error when I went to http://sig.se.gob.ar/cgi-bin/mapserv6%7Cplanosbase_puntos_caracteristicos
Your link might be bad. Also, I think it needs to come from a rest endpoint like these: (https://services.arcgis.com/cJ9YHowT8TU7DUyn/arcgis/rest/services/About_EPA_-_EPA_Locations/FeatureServer/0)

@tannerjt
Copy link
Owner

Hi @micbrenn , @kawikakanaka is correct that that it must from an Esri REST endpoint. It supports Esri Feature Services, and Dynamic Map Services with the Query endpoint enabled. It does not support WMS. WMS returns an image of the rendered layer and does not allow access to the individual features. You can export features from a WFS, although this script does not specifically target OGC services. When working with ArcMap, you can add a WMS directly, although you cannot interact with the service like you could with a WFS or Esri Feature Service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants