Skip to main content

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
0 answers
9 views

Demographic Data API based on lat long with radius

I am working on a web app where I need to show USA demographic data such as population, age, gender, race, household income, and employment status based on a location and within a radius of 1, 3, or 5 ...
amit sankhyan's user avatar
0 votes
0 answers
36 views

npm tileserver-gl exits when running on Windows Server 2016

I am facing an issue with tileserver-gl installed with npm. I installed node 20.9.0 (the problem also persisted on the 21.6.1) on Windows Server 2016. I installed tileserver-gl using npm install -g ...
ngwako mokgohloa's user avatar
0 votes
2 answers
263 views

Error when creating polygons with turf.js from existing GeoJSON polygon rings

I'm getting the following error: Uncaught (in promise) Error: Each LinearRing of a Polygon must have 4 or more Positions. when trying to use @turf/turf module: async function selectSubregion(e) { ...
chovy's user avatar
  • 103
0 votes
1 answer
39 views

"Add a new Geonode plugin extension" doesnt work

I have a question. In this part of the geonode tutorial (https://training.geonode.geosolutionsgroup.com/master/GN4/mapstore_client/005_EXTENSION.html), I get the following error while running "...
John Boswell's user avatar
0 votes
0 answers
91 views

Encountering an error: "Unexpected end of JSON input" when inserting GeoJSON data into MongoDB

In my MERN application, I am getting an Unexpected end of JSON input when trying to insert a GeoJSON data in my MongoDB using Thunder client in Visual Studio. Here is my GeoJSON data: { "...
Sonny's user avatar
  • 13
0 votes
0 answers
39 views

How to Importing gdb file into PostGIS using ogr2ogr in JS

I use ogr2ogr in nodeJS , my code is here : ogr2ogr('D:/xxx.gdb', {format: 'PostgreSQL', options: [ "destination", `PG:'host=xxxxx port=5432 user=postgres password=xxxx dbname=...
VItaM's user avatar
  • 1
0 votes
1 answer
31 views

PyQGIS 'exporter.exportToPdf' doesn't always work when called by my node.js app

I have a node.js web app that takes some inputs and produces a pdf using the PyQGIS python API. The Python script sometimes fails when calling: exporter.exportToPdf(pdfName, QgsLayoutExporter....
lachlan_epic's user avatar
1 vote
1 answer
100 views

Running a GEE function on Node.js provides different output

I'm trying to run this GEE code in Node.js var forestlayer1 = ee.Image("users/path/to/forestlayer"); var geojson = { "type": "Polygon", "...
Simone Parmeggiani's user avatar
0 votes
1 answer
274 views

.getImage() generates error in geotiff.js

i am using geotiff.js lib to perform some processing on tiff files. referring to the official doc of the aforementioned lib here https://github.com/geotiffjs/geotiff.js you can see in section Example ...
Amrmsmb's user avatar
  • 305
1 vote
0 answers
108 views

Get elevation from GeoTIFF using node-gdal lib?

I developed an open and free Geo API for Portugal and now I'd like to provide altitude without the need of external APIs, that is, using the GeoTIFF file provided by the government agency. I developed ...
João Pimentel Ferreira's user avatar
1 vote
1 answer
269 views

ee.reduceRegion() returns error 'Cannot read property 'count' of undefined'

I'm using google earth engine javascript API with nodeJS and Express. Both the authentication with Eearth Engine API and Initializing the EE API is a success. I would like to do a pixel count to ...
Derick Ongeri's user avatar
1 vote
0 answers
1k views

How to use OpenLayers in Node.js

I am new in programming so it maybe that my question is not so professional. I am going to make an OpenLayers application with Node.js. I have installed Node.js and then install OpenLayers with npm ...
far_2003's user avatar
1 vote
0 answers
188 views

Upload multiple compressed shapefiles to GeoServer through GeoServer API

Currently, I am trying to upload a file that compressed the shapefile elements on the local server through GeoServer REST API, but there is a blockage. Currently, I am using nodejs and making a ...
sjanjan's user avatar
  • 11
2 votes
0 answers
64 views

Calculate nearest point in a orbital path to user (GPS)

TLDR: how do I go about determining the nearest point in an orbital path to a user's location? Longer version: This is gonna remain a bit vague, I'm uncertain of the terminology needed to ask/answer ...
Douglas G. Wright III's user avatar
0 votes
1 answer
523 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 ...
Andre Otte's user avatar
1 vote
0 answers
886 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://...
GeoFresher's user avatar
0 votes
1 answer
287 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&...
firstlord's user avatar
  • 149
2 votes
0 answers
378 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-...
GravitaZ's user avatar
  • 535
1 vote
0 answers
422 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 ...
Sven's user avatar
  • 11
0 votes
2 answers
692 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.
BR75's user avatar
  • 447
1 vote
1 answer
2k 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.
ihssan's user avatar
  • 13
0 votes
0 answers
457 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 ...
IBot's user avatar
  • 111
1 vote
0 answers
139 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 :...
BallpenMan's user avatar
  • 1,217
1 vote
1 answer
451 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 ...
user25730's user avatar
  • 894
0 votes
0 answers
385 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 ...
James Gee's user avatar
0 votes
1 answer
1k 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 ...
G McLeod's user avatar
1 vote
0 answers
102 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 ...
Dan Narsavage's user avatar
2 votes
0 answers
372 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 / ...
James Gee's user avatar
0 votes
1 answer
1k 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'...
Seth Lutske's user avatar
0 votes
0 answers
111 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?
brigit maria baby's user avatar
1 vote
0 answers
361 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 ...
Matheus Toniolli's user avatar
2 votes
1 answer
702 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 ...
David's user avatar
  • 61
1 vote
0 answers
154 views

Tiling 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", ...
semper's user avatar
  • 11
0 votes
0 answers
633 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-...
Sai Sravya's user avatar
0 votes
1 answer
3k 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 ...
ki-code's user avatar
  • 11
0 votes
0 answers
245 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 ...
gregi1991's user avatar
  • 103
1 vote
1 answer
926 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 ...
Vikrant Kumar's user avatar
1 vote
0 answers
399 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/...
user3003374's user avatar
3 votes
1 answer
2k 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 ...
ram_nl's user avatar
  • 179
1 vote
1 answer
369 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 ...
Leo's user avatar
  • 952
-1 votes
2 answers
659 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 ...
fullstack's user avatar
  • 109
4 votes
1 answer
1k 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 ...
user154666's user avatar
3 votes
1 answer
2k 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 ...
TonyGis's user avatar
  • 213
-2 votes
2 answers
2k 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://...
user154666's user avatar
1 vote
1 answer
1k 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 ...
Moehrengulasch's user avatar
0 votes
0 answers
147 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 ...
Geographos's user avatar
  • 4,029
1 vote
0 answers
718 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 ...
Sreejith Ms's user avatar
1 vote
1 answer
195 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 ...
Alex's 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) { ...
Angels's user avatar
  • 161
3 votes
1 answer
2k 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 ...
Angels's user avatar
  • 161