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
1
vote
1answer
36 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
0answers
11 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) { ...
2
votes
1answer
53 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 ...
0
votes
0answers
37 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 ...
1
vote
1answer
40 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 = ...
0
votes
1answer
45 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-...
0
votes
0answers
201 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++ ...
0
votes
0answers
62 views

Importing OL5 files in NodeJS

I need to import things from OpenLayers-5 into my NodeJS application so that I can show the WMS-layers I made with GeoServer. It seems that there is no way around NodeJS with Express if I want to ...
0
votes
0answers
157 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, ...
0
votes
1answer
316 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 ...
0
votes
1answer
117 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 ...
0
votes
1answer
543 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 ...
1
vote
1answer
325 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 ...
2
votes
1answer
270 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 ...
0
votes
1answer
86 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; ...
1
vote
0answers
117 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 = [...
1
vote
1answer
1k views

Recommended starting point for an OpenLayers v5 (node.js and npm) project

I have a large monolithic OL4 js/php system that I have hacked together in the last year, that has lots of raster and vector functionality driven by json parameter files. I want to refactor/rewrite ...
2
votes
1answer
819 views

Is there a way to install leaflet search plugin without using npm?

I am not familiar with Node.js or npm at all, but my IT has told me node.js/npm is not compatible with our IIS, and the only search plugins to add on to leaflet are using npm to install them. I did a ...
0
votes
1answer
124 views

“print()” alternative for nodeJS

i need run this code in my nodeJS application: //Dates of Interest var start = ee.Date("2014-10-01"); var finish = ee.Date("2018-05-01"); ///--------------------- Landsat Collection -----------------...
0
votes
0answers
130 views

Get coordinates from web mercator projection to Lan & Lot (JavaScript/ node.js) [duplicate]

I have the WKT coordinates like below. LINESTRING (16139582.976129573 -4541142.959679384,16139974.715899538 -4540837.211566243) How can I get the Longitude and Latitude from that. I am using ...
0
votes
1answer
225 views

Is it possible to handle QGis server requests through nodejs

I have a nodejs based application server. I would also like to add qgis-server functionality to node. Something like this: expressapp.get(someAuthenticationMiddleware(), qgisServerRequestHandler()); ...
0
votes
0answers
74 views

Gdal Read Geodatabase Features Don't Show Object ID

I am using Gdal Node.js interface to read features of a layer from a Esri Geodatabase. My javascript code looks like this: var dataset = gdal.open(inputPath); var layer = dataset.layers.get(layerName)...
1
vote
3answers
617 views

Command line-tool to convert geojson file to line-delimited geojson

I'm loving the ndjson-cli tools for working with newline-delimited GeoJSON files. But I can't seem to find a tool that converts a standard GeoJSON (whether minified or prettified) ond converts it to ...
1
vote
1answer
899 views

Extracting data from hgt files?

SRTM3 .hgt files have 1201*1201 DEM elevation data, I extract .hgt files data elevation into file Elevation.json with index.js with the help from this GitHub project. Then I rename Elevation.json ...
1
vote
1answer
133 views

How can I project this data correctly in node-mapnik?

I'm trying to use node-mapnik to rasterize vector data into a transparent image and overlay it onto a basemap. I'm generating OpenStreetMap basemaps with tile-stitch. That's working well. I'm then ...
1
vote
0answers
80 views

Obtain the number of features in a Shapefile using NodeJS

I'm using the shapefile NPM library which works well, but it doesn't provide a count of the number of features in a Shapefile. Is there some other library which can access this information (other than ...
3
votes
1answer
2k views

Forming queries with node.js, PostGIS and GeoServer?

I am not sure If I got the overall web-mapping architecture right. I can easily find tutorials about each part, but nothing on how to connect them. I have openlayers in the front-end, node.js as a ...
1
vote
1answer
156 views

Get Mapbox tile-reduce up and running

I'm new to Mapbox tile-reduce library. I would like to process OSM tiles for Portugal. I've download the mbtiles from Portugal. I've installed tile-reduce with: npm ini npm install @mapbox/tile-...
2
votes
0answers
395 views

Failed…error: bind message supplies 3 parameters, but prepared statement “” requires 1

I am using node to capture gps data from my devices after every 30 seconds, i want to store the data into a table but when executing the query statement it throws an error Failed.........error: bind ...
3
votes
2answers
1k views

geojson to mapbox vector tile in nodejs

I'm looking for a way to transform geoJson (obtained from a query to potsgis) to mapbox vector format, serverside in nodejs, without using mapnik (I dont have access to the server and therefore cannot ...
1
vote
0answers
203 views

Storing point in PostGIS from web app?

I have a vectortile layer of points I added to PostGIS using ogr2ogr, which runs on a remote server. The points show nicely on my client in the browser. Now I would like to add a point from my clients'...
1
vote
0answers
612 views

How to create geojson Polygons from Lines?

Given a series of overlapping lines (MultiLineString) in Geojson how can I create polygons for those portions that form an enclosed a space? Sample data - https://gist.github.com/maphew/...
1
vote
2answers
12k views

Seeking offline map API like Google Maps for web? [closed]

I'm looking for an offline map API for web like Google maps (because I know I can't use this offline). I currently have a program (using js and node.js) that uses the google maps api and google roads ...
1
vote
1answer
122 views

cmv-app 2.0 connect.json is not a function

I am using the Dev branch of the cmv-app and having trouble getting up and running out of the box. It looks like I am unable to start the web server - error says connect.json is not a function. I ...
0
votes
1answer
436 views

Generating XYZ tiles in nodejs

I'm looking to create XYZ tiles for use in leafletjs with nodejs. Previously I've been creating my tiles using this python library (gdal2tiles). I was wondering if anyone had yet written a nodejs ...
0
votes
1answer
674 views

Error 404 when setting up web app builder (developer edition) on computer

I'm installing Web AppBuilder (Developer Edition) on my PC and running into an error. I successfully connected to my local host and got to the page where I specify my Portal for ArcGIS URL. I have ...
0
votes
0answers
102 views

Errors encountered executing: tessera tmstyle:///

I am trying to follow demo provided here. Tessera (a Tilelive implementation) is supposed to serve .tm2 files created in Mapbox Studio Classic to localhost using node js. The errors returned seem ...
4
votes
0answers
428 views

OpenLayers 3 unit test tips [closed]

I am trying to write some mocha/expect unit tests for my OpenLayers based app. I tried using jsdom to simulate the DOM, and ended up having to add also xmldom, canvas, and now it still won't work ...
2
votes
0answers
117 views

Can OpenLayers 3 run without browser or is it designed to be used only in browser?

I need to run OpenLayers app which will render some map into canvas and then I need url of that canvas ( Canvas.toDataUrl() ), I would use NodeJS and Node Canvas to get it done. I wonder can ...
2
votes
0answers
83 views

XML entities not working with node-mapnik

I'm not getting XML entities to work with node-mapnik. In the changelog for 1.4.4 I read: "Mapnik now build with rapidxml/ptree xml parser rather than libxml2 (meaning no xincludes or entities are ...
2
votes
1answer
3k views

Creating an OpenLayers map in Node.js View

I'm new to node.js and am attempting to put a simple OpenLayers map on a page. However, the map is not showing up. Code: app.js var express = require('express'); var app = express(); app.set('...
1
vote
0answers
101 views

Getting PNG map from PostGIS to Node and then jquery

Using Jquery, I am aiming to get png map from postGIS which has been created dynamically from node server in different port. I used jsonp to overcome cross domain issue in jquery. $.ajax( 'http://...
1
vote
0answers
311 views

Get grid area from geographic coordinates

I have a list of geo coordinates. What I want is a list of grid areas and a number of geographic points in that area. By doing this I can get the information in which areas in the world the most ...
2
votes
2answers
195 views

mapbox vector tiles and data

What is the best way to access data I uploaded to mapbox with a click on tile. I'm working on a web site using Node.js. I need to display a local map, click on the tile for a property and return ...
1
vote
1answer
2k views

Converting Mapbox Vector Tiles To GeoJSON

I'm working on a project that needs to do some simple turf.js work on the client. I am using Mapbox to host my GeoJSON data. Mapbox serves the client this data as a vector tile set, which saves a lot ...
0
votes
1answer
247 views

On lower zoom polygons don't show

I'm working with Leaflet and nodejs and when a polygon layer is loaded when the map view is at world map, the polygon don't shows, I have to zoom in at approximately zoom 10 or 13 to show polygons. I ...
2
votes
1answer
1k views

dojo/request a png image array buffer using NodeJS, and return the image to the client

I am attempting to request a png image using NodeJS and dojo/request from an ArcGIS Server REST feed, and return the image to the client. I need nodeJS to add a token to the request as a query ...
3
votes
0answers
493 views

Upload .tif to GeoServer via Node.js

How do I upload a .tif file to my running GeoServer via Node.js? I'd like to upload a GeoTIFF to provide it as a WMS by the GeoServer. The GeoServer is responding with a 405, which I think is right (...
2
votes
1answer
298 views

POST to CartoDB Maps API via NodeJS

We are attempting to port a Python-based CartoDB authentication sample app to NodeJS: The example, "Basic auth middleware with CartoDB," was created by CartoDB labs. We have sucessfully replaced one ...
0
votes
2answers
1k views

Serving an image as a tile layer with node mapnik

I have an image that I get from a server, I need to then take that image and tile it on the fly and pass it back to the user. Everything I see keeps using stylesheets which is not what I want/need. Is ...