Questions tagged [node-js]

Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications

Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

Google Earth Engine - How do I export image to cloud storage using Node.js?

I am trying to use the Google Earth Engine API to generate images and upload to Google cloud storage via Node.js. I followed the GEE guide to authenticate a Google Cloud project server side. I am ...
user avatar
1 vote
0 answers
78 views

Loading shapefile data into L.shapefile says nodebuffer is not supported by this platform

I am having a shapefile that is converted to a Base64 string. I am converting it to a file and then trying to convert to arrayBuffer using 'FileReader' to fit the data to match (L.shapefile) https://...
user avatar
0 votes
1 answer
61 views

How to add KML file to PostgreSQL as polygon in nodejs

I have a nodejs server which is connected to PostgreSQL database. I need to create a polygon by using coordinates JSON with fields. In the PostgreSQL database there is a default column as "geom&...
user avatar
0 votes
0 answers
35 views

Moment libraries not loading correctly in WAB

I am working on a Web AppBuilder application that uses 3rd party libraries (developers edition - the code on my local machine, not in Portal/AGOL). One of these libraries includes the Moment and ...
user avatar
  • 1,679
0 votes
0 answers
38 views

Installing Experience Builder in Offline Environment - Errors

I have followed the instructions provided by esri at this link, but I cannot get the Experience Builder to install properly in our offline DEV environment. https://developers.arcgis.com/experience-...
user avatar
  • 465
1 vote
0 answers
109 views

Exporting a table from Earth Engine to Cloud Storage using the npm package

I try to export a table from Google Earth Engine to Cloud storage with a script that runs using NodeJS instead of the code editor. However, when running the script, no file is added to the Cloud ...
user avatar
  • 11
0 votes
1 answer
126 views

Using gdal_translate in node-gdal?

How can I use gdal_translate in node-gdal? I'm trying to use the following command: gdal_translate C:\test.tif cog.tif -co TILED=YES -co COPY_SRC_OVERVIEWS=YES -co COMPRESS=DEFLATE.
user avatar
  • 391
1 vote
1 answer
266 views

Convert shapefile to JSON by using node js

I want to convert a big shapefile to JSON and store it inside MongoDB. Is there any tutorial to help me? Or any library that could help.
user avatar
  • 13
0 votes
0 answers
55 views

Can I use ArcGIS REST-API "applyEdits" to update Feature-Layer as an authenticated user?

I'm using nodeJS to edit my Feature-Layer using REST API. My intention is to: Update my layer using Firebase Cloud-Functions Share my layer publicly But keep my layer non-editable for unauthorised ...
user avatar
0 votes
0 answers
127 views

Import GeoJSON object into PostGIS in JavaScript

I'm looking for a way to persist my GeoJSON object to a table in PostGIS, I've installed the ogr2ogr JavaScript library to achieve this; on this case this what I got so far: async function ...
user avatar
  • 11
1 vote
0 answers
29 views

How to run topojson from Powershell?

I have already installed node.js and used it to install topojson via npm install topojson. But when I run command like topojson input.geojson -o output.topojson, I get the familiar error of topojson :...
user avatar
  • 1,159
1 vote
1 answer
63 views

Getting data/geometry from Azure Database into Azure Maps

I'm currently working on a proof-of-concept where we're using an Azure Database as our data storage. I've got one table in there containing a few bits of information, and a geometry column (geometry ...
user avatar
  • 814
0 votes
0 answers
116 views

Unable to find 'coordinates' in GeoJSON string error when creating controller API

I am trying to create an API to insert Geojson data into Postgres/PostGIS and I am getting the below error message when I try to make a post. Is there anything obvious that stands out where I could be ...
user avatar
0 votes
1 answer
494 views

Getting GeoJSON file to load in OpenLayers

I have validated the JSON and I'm certain it is clean. I'm loading it from a web server (using Node.js). The Firefox error is "Uncaught SyntaxError: JSON.parse: unexpected character at line 1 ...
user avatar
1 vote
0 answers
41 views

Source controlling Esri Web AppBuilder Widgets and Themes

I'm not a JavaScript kind of guy but I'm trying to get ramped up in advance of some retirements of the people that have handled our web mapping applications (but whose savvy to source control ranges ...
user avatar
2 votes
0 answers
171 views

GeoJSON format (Geography) for posting in Postman tin PostgreSQL

I am trying to do an update posting on Postman for the first using PostGIS / Geography file type and I don't know where I am going wrong. I have included the model below of the table in pgamdin 4 / ...
user avatar
0 votes
1 answer
301 views

Leaflet's map.project(latlng, zoom) without a leaflet map instance

I am working with a leaflet app and I'm shifting a lot of the GIS calculations to the back end (a nodejs app). I need to be able to get the RGB value of a pixel given the latlng and the map zoom. (I'...
user avatar
0 votes
0 answers
58 views

Coordinate transformation npm for X,Y and Z values

Is there any direct node parameter libraries (npm) available to convert the X, Y, and Z values from one coordinate system to another? And are there any other methods for this conversion?
user avatar
1 vote
0 answers
162 views

How to create a tile from a TIFF stored in PostGIS using Mapnik in nodejs

I stored TIFF in the database using: raster2pgsql -c -C -s 4326 -f geom_raster -F -I evapo_01_201.tif -t 200x200 public.rasters | psql -U postgres -d gaaf -h localhost -p 5432 I think it's alright ...
user avatar
1 vote
1 answer
204 views

Clipping MBTiles with BoundingBox

I have a relatively large worldwide raster mbTiles file from which I want to convert individual countries into new mbtiles. Unfortunately I fail to use tilelive which is actually predestined for this ...
user avatar
  • 51
1 vote
0 answers
105 views

How to tile Mars themis raster for Cesium

I am trying to tile the Mars themis raster that has the following crs: PROJCS["SimpleCylindrical Mars", GEOGCS["GCS_Mars", DATUM["D_Mars", ...
user avatar
  • 11
0 votes
0 answers
274 views

Uncaught TypeError: ol.control.Timeline is not a constructor

I have been trying to create a timeline in my openlayers map. However it shows that it is not a constructor. How to fix this? this is my code var tline = new ol.control.Timeline({ className: 'ol-...
user avatar
0 votes
1 answer
2k views

Executing task npm run test in Visual Code Studio stopped working

I was working normaly in Visual Code Studio and everything was ok, then stopped uploading my changes from js in localhost server page.With npm start and build:server is running and built. But npm run ...
user avatar
  • 11
0 votes
0 answers
162 views

How to use node.js with ArcGIS Web AppBuilder to list files in a widget

I have built an ArcGIS Web AppBuilder and a custom popup (widget.js). My goal is to list every file in a specific directory (in 'wwwroot' folder) to the popup user. I didn't find any built-in ...
user avatar
1 vote
1 answer
437 views

How to get the co-ordinates of the clicked point using 'ol/Draw' in OpenLayers 6?

I am trying to create a measure tool using OpenLayers 6. I did get examples to measure distance and area using the ol/Interaction/Draw and ol/geom library classes. I want also to measure the ...
user avatar
1 vote
0 answers
276 views

WebSocket connection error with OpenLayers [closed]

I am new to OpenLayers and NodeJS. I have installed OpenLayers on my EC2 instance following exactly the instructions found on the OpenLayers website (https://openlayers.org/en/latest/doc/tutorials/...
user avatar
1 vote
1 answer
812 views

Using Node.js to cluster millions of points on the server side

Situation: I am testing out different visualization techniques for web mapping a data set that has about 2.5 million points and a lengthy set of attributes (almost 30 fields). So its quite a large ...
user avatar
  • 139
1 vote
1 answer
110 views

Add WMS to OpenLayers after click

I have a working WMS service under http://localhost:8080/geoserver/nis/wms?service=WMS&version=1.1.0&request=GetMap&layers=nis%3Atest Also I have a Node JS application with OpenLayers. In ...
user avatar
  • 874
-1 votes
2 answers
386 views

NodeJs library to convert ESRI point(x, y, wkid) to lat/lng

I use ArcGIS and get an array of ESRI points which I need to convert to lat/lng. I don't want to use the ArcGIS API, because it requires too many calls. Is there any library that can do the work for ...
user avatar
  • 109
3 votes
1 answer
719 views

Earth Engine NodeJS API: Failed to load resource and CORS policy issue

I am developing a GEE nodeJS custom application. I have gone through the documentation and source(https://github.com/google/earthengine-api/tree/master/demos/server-auth-nodejs). I setup the service ...
user avatar
3 votes
1 answer
1k views

QWC2 first install

I'm trying to install QGIS Web Client 2 (QWC2) following instructions in "Quick start" documentation: https://github.com/qgis/qwc2-demo-app/blob/master/doc/QWC2_Documentation.md#quick-start So, I ...
user avatar
  • 213
-2 votes
1 answer
933 views

Google Earth Engine API map deploy to a website

Can we convert Google Earth Engine code (i.e., which is written in GEE console) to JavaScript so that it can be viewed on a website/app? I have gone through the GEE API documentation (https://...
user avatar
1 vote
1 answer
571 views

Openlayers: Using PHP and npm

I've got a rather large MySQL database containing polygons (coordinates) and their additional properties (e. g. text labels in different languages). I would like to use PHP to connect to my database ...
user avatar
0 votes
0 answers
109 views

Incorporation the Ordnance Survey map to Sheetsee.js plugin for Leaflet/Mapbox

I am currently using this plugin: https://github.com/jlord/hack-spots which works really nice in conjunction with Google Sheets. My goal is to convert this site into my own purposes. One of the ...
user avatar
  • 3,603
1 vote
0 answers
459 views

Finding boundary coordinates of user current location with a given radius

I have my current lat and lng details { "lat": 8.561032, "lng": 76.846333 } And from this I need to build a boundary around me with given radius. So How can I get the boundary ...
user avatar
1 vote
1 answer
70 views

Find a point in a polygon

How can I find all points in a polygon pass in queries: My column coord is a geometry point example, pseudo-code. select a.* from "table" as a where ST_WITHIN(a.coord, [lng1 lat1, lng2 lat2, lng3 ...
user avatar
  • 23
0 votes
0 answers
99 views

Adding style to a published layer using GeoServer REST API with Node.js [duplicate]

Lets say I have a custom style in GeoServer and after I created a new layer, I want to add the style to that layer. I am using this link for documentation. function editLayerStyle(layerName, body) { ...
user avatar
  • 51
3 votes
1 answer
715 views

Adding existing style while publishing a new layer in GeoServer using REST API

I have a function which publishes a layer in GeoServer with the REST API. Now I want to add an existing style in the layer while publishing it. Anyone has any idea where I write the style name or ...
user avatar
  • 51
0 votes
0 answers
668 views

Transforming Alaska and Hawaii to be next to USA with TurfJS?

I'm working on an app that contains a map; right now, the map just includes the Continental US, but it would be great if Alaska and Hawaii could be included as well. So far, I've found shapefiles ...
user avatar
  • 1
2 votes
1 answer
2k views

Creating and publishing a new layer in Geoserver using Geoserver Rest API

I want to publish a new layer in Geoserver. The layer seems unpublished and I get 'Undefined' error. const publish = function () { return new Promise((resolve, reject) => { const layer = ...
user avatar
  • 51
0 votes
1 answer
128 views

Points in Polygon with ArcGIS-REST-JS library

I am trying to get the points in polygon with Node JS libraries. Using Simple JS, I can get using QueryTask. But there is no queryTask in Node lib. var queryFeat = require('@esri/arcgis-rest-feature-...
user avatar
0 votes
0 answers
257 views

Routing Engine written in JavaScript

I'm looking for a routing engine written completely in native JavaScript or Nodejs, which is distributed with an open source license So far the solutions I've found are implemented only in Java, C++ ...
user avatar
  • 266
0 votes
0 answers
301 views

OL5 functions in JavaScript not working with NodeJS

So I made a weathermap with GeoServer and OpenLayers5. Works fine and all, but NodeJS keeps giving me a hard time. Does anybody know how this really works? Because I need input from the end-user, ...
user avatar
  • 75
0 votes
1 answer
800 views

Function in OpenLayers 5 JavaScript does not work

I am making a weather application and it is essentially working. (It is my first GIS-application, so I am really glad with that!) It is just still very basic. I made de application with PostGIS, NPM ...
user avatar
  • 75
0 votes
1 answer
452 views

NodeJS Geometry string from GPS coordinates before sending to DB?

I'm building an application that saves geographical data to the postgresql db with postgis extension. The data I'm saving is in EPSG 4326 WGS84 format, so I'm sending lat/lng coordinates to the ...
user avatar
0 votes
1 answer
3k views

CORS ERROR with own WMS GeoServer layers

I am building a weather application. For this I want to use OpenLayers as the base for my application and then I want to be able to add my own made layers from PostGIS with GeoServer to this ...
user avatar
  • 75
1 vote
1 answer
2k views

Adding a position.watch and update feature to live map with leaflet.js?

I have an app working in node.js that locates a user and plots their location on a leaflet map. When others connect it shows them too. It keeps their marker live as long as they move the mouse. I ...
user avatar
2 votes
1 answer
1k views

LAS/LAZ parser for NodeJS

I cannot find any popular libraries for parsing (reading into memory) of LAS or LAZ (lidar data) files in NodeJS (desktop Javascript) https://github.com/yuyou/liblas4node/blob/master/lib/liblas.js ...
user avatar
  • 4,949
0 votes
1 answer
284 views

Map tile not rendered on node-mapnik?

const mapnik = require('mapnik'); const sphericalmercator = require('@mapbox/sphericalmercator'); mapnik.register_default_fonts(); mapnik.register_default_input_plugins(); const TILE_HEIGHT = 256; ...
user avatar
  • 191
2 votes
0 answers
314 views

Why does node Circle to Polygon module returns oval/ellipse instead of a shape like circle?

I'm using npm package circle-to-polygon and I wrote following code to return a polygon which is approximately like a circle. const circleToPolygon = require('circle-to-polygon'); let coordinates = [...
user avatar
  • 121