Questions tagged [node-js]
Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications
115
questions
0
votes
0
answers
12
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
0
answers
21
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:
{
"...
0
votes
0
answers
12
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=...
0
votes
1
answer
28
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
53
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
124
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 ...
0
votes
0
answers
34
views
NodeJS map rendering libraries other than Mapnik
I'm looking for a library to call from Node that can render a fairly simple map (a single polygon, with text labels along edges) from GeoJSON to a PNG. I have a working solution using Mapnik, but that ...
0
votes
0
answers
63
views
'Error reading object gs://...' when exporting map tiles from GeoTIFF loaded from Google Cloud Storage
I'm getting the error in the title intermittently when exporting map tiles using the nodejs Client Library where the image being tiled is loaded from ee.Image.loadGeoTIFF(). The first work unit (of ...
1
vote
0
answers
79
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
147
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 ...
0
votes
0
answers
358
views
npm, openlayers, vite : ol is not defined
[email protected],
[email protected],
[email protected]
I tried to use NPM for the first time like it is related here. Thus, I added Geoportail extension.
Here is the html file:
<!DOCTYPE ...
0
votes
0
answers
918
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
1
answer
148
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
54
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
437
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
703
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
234
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&...
1
vote
0
answers
278
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
378
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
565
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
408
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
119
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
328
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
330
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 ...
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 ...
1
vote
0
answers
101
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
333
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
817
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
102
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
338
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
559
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
148
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
560
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
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 ...
0
votes
0
answers
234
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
804
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
383
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/...
1
vote
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
337
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
619
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
1k
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
142
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
668
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
184
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 ...
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) {
...
3
votes
1
answer
1k
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 ...