Questions tagged [node-js]
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications
117 questions
0
votes
0
answers
21
views
PostGIS, Node.js, Express.js => OpenLayers from localhost to server
New to Node.js I try to build up an api to display data from PostGIS in OpenLayers.
In my development environment this works fine using Node / Express to deliver GeoJSON on localhost:3000. The ...
1
vote
1
answer
18
views
How to load a returned GeoJSON into a WebMap of a Web Application
My goal is to have a web application with a Leaflet webmap that will display a GeoJSON file as layer, based on id from user input.
Current setup: Node, ejs, express, Leaflet
A folder with multiple ...
0
votes
0
answers
59
views
Use GDAL to extract a part of an raster image
I have an png image where I know the bounds and its CRS. I have a bbox in a different CRS which I want to use to cut a part from the original image.
How can I do that?
Ultimately I need to do that in ...
1
vote
1
answer
133
views
Use PostGIS data with node.js, Express.js in OpenLayers
I've followed the quick start guide from OpenLayers to build a new app using
node.js. So I have now a nice OSM Map (index.html + main.js), where I added already a few backgroung layers and a ...
0
votes
0
answers
29
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 ...
1
vote
0
answers
71
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 ...
0
votes
2
answers
520
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) {
...
0
votes
1
answer
55
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 "...
0
votes
1
answer
35
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....
1
vote
1
answer
126
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",
"...
0
votes
1
answer
354
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 ...
1
vote
0
answers
123
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 ...
1
vote
1
answer
324
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 ...
1
vote
0
answers
2k
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 ...
1
vote
0
answers
204
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 ...
2
votes
0
answers
70
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 ...
0
votes
1
answer
566
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 ...
1
vote
0
answers
940
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://...
0
votes
1
answer
321
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&...
2
votes
0
answers
415
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-...
1
vote
0
answers
437
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 ...
0
votes
2
answers
744
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.
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.
0
votes
0
answers
478
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 ...
1
vote
0
answers
150
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 :...
1
vote
1
answer
537
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 ...
0
votes
0
answers
417
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 ...
1
vote
1
answer
2k
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 ...
1
vote
0
answers
103
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 ...
2
votes
0
answers
384
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 / ...
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'...
0
votes
0
answers
116
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?
1
vote
0
answers
390
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 ...
2
votes
1
answer
801
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 ...
1
vote
0
answers
164
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",
...
0
votes
0
answers
655
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-...
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 ...
0
votes
0
answers
252
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 ...
1
vote
1
answer
980
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 ...
1
vote
0
answers
410
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/...
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 ...
1
vote
1
answer
379
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 ...
-1
votes
2
answers
669
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 ...
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 ...
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 ...
-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://...
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 ...
0
votes
0
answers
150
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 ...
1
vote
0
answers
731
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 ...
1
vote
1
answer
197
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 ...