Questions tagged [mongodb]

MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms.

Filter by
Sorted by
Tagged with
1 vote
1 answer
96 views

"'location object expected, location array not in correct format" error while trying insert polygon into MongoDB

I convert the geojson Feature geometry into a geoJsonPolygon for Mongo, and the result is a however, i keep getting the error: message='location object expected, location array not in correct format',...
Jeryl Cook's user avatar
0 votes
0 answers
26 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
12 views

Connecting hosted MongoDB with GeoServer

How can I connect the shared MongoDB database to GeoServer? I'm trying to follow https://docs.geoserver.org/latest/en/user/extensions/mongodb/index.html but not sure how the url will be , I have ...
krishna lodha's user avatar
0 votes
0 answers
59 views

Projection Transformation from ArcGIS Pro to GeoJSON

I have a dataset with points in a layer viewable in ArcGIS Pro where all points are correctly placed on the map. When I export the attribute table to Excel, the data looks like this: Year Country ...
PeterT's user avatar
  • 101
0 votes
0 answers
93 views

Extract feature from featurecollection in MongoDB atlas

I need to extract data from my database and add pointer to the map with folium. import folium import os from folium import features import numpy as np import pandas as pd N = 1000 lons = +5 - np....
chaoslobster73's user avatar
1 vote
0 answers
75 views

Search if point is inside bbox in MongoDB

I am having difficulty finding away to search if a user current geo location is inside a bbox array that is stored in MongoDB. For example I want to see if the following 174.763336, -36.848461 is ...
RUSSELL HARROWER's user avatar
0 votes
1 answer
109 views

Query MongoDB using a custom CRS and pymongo

I'm trying query a Mongo database using a GEOJSON object with projected coordinates. My query statement looks like this: { 'location': { '$geoIntersects': { '$geometry': { ...
Adriano Matos's user avatar
0 votes
0 answers
634 views

What is the appropriate way to store geospatial data in MongoDB?

I'm in the process of planning my MongoDB schema for a MEAN stack web app that will deal with a lot of geospatial data. Points, polylines, etc. I've been boning up on the GeoJSON spec. One of my ...
NYCaver's user avatar
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
1 answer
215 views

GeoServer Docker - Data loss

I deployed a GeoServer image on Docker and I'm encountering a problem whenever the pod restarts. Every time the pod restarts, the workspace and datastore get deleted although the data in the database ...
Ahmed Magdy's user avatar
2 votes
1 answer
279 views

Geoserver WFS-T with mapping file not inserting features

I am wondering if this is supported and could not find the answer yet. I did my setup according to https://docs.geoserver.org/latest/en/user/data/app-schema/mongo-tutorial.html and by the above ...
dtechlearn's user avatar
1 vote
1 answer
558 views

Find neighboring polygons in MongoDB

I have a collection of polygons in a geojson format and I'm trying to find for one polygon, its neighbors. I tried to use the $geoIntersects operator like so coords = [...] # some coordinates of a ...
bebenzer's user avatar
1 vote
1 answer
1k views

Can I store both a Point and a Polygon in GeoJSON format for a single feature?

I've generated a GeoJSON file using ogr2ogr from an ESRI Shapefile for UK Protected Wrecks provided by Historic England - the standard format for the outputted GeoJSON is: { "type":"...
Michael Smith's user avatar
2 votes
1 answer
358 views

Points within Polygons given certain conditions

I am trying to locate all the points within a set of polygons given a certain condition on the polygon in MongoDB using Python 3x. This question differs from the other ones because i) it requires ...
Vladimir Bogdashkin's user avatar
1 vote
0 answers
79 views

Converting dates in a CSV file into Seasons?

I'm very new to MongoDB and clear with the basics but got stuck at a point. I'm working in MongoDB with a CSV file. In it, there's a column called 'Issue Date'. Some dates are represented as MM/DD/...
NinjaOnGaanja's user avatar
0 votes
1 answer
442 views

Query to intersect polygons in PostGIS with points in MongoDB

Question: Is it possible to intersect geometries from No-SQL and SQL databases? Background: I need to delete the polygons from a PostGIS database that intersects with points (Lat/Long) in a MongoDB. ...
Ycavazin's user avatar
  • 401
0 votes
0 answers
344 views

Connect GeoServer to MongoDB

I'm new to this GIS stuff and I've already got the MongoDB extension working, added a database to GeoServer (2.15.1) store and even managed to add a layer and recognizing the document structure (it's ...
jebrcidea's user avatar
1 vote
1 answer
653 views

What algorithm is used by the $geowithin operator of Mongodb

MongoDB can perform geospatial query such as finding restaurants inside region with the operator $geowithin. For example: db.places.find( { loc: { $geoWithin: { $geometry: { ...
oussREE 's user avatar
4 votes
1 answer
2k views

MongoDB - fast & accurate k-NN

We have been testing the effectiveness of the k-NN query in MongoDB and Postgis on New Year City's taxi dataset on two aspects: run-time and accuracy. The staggering outcome is that MongoDB detects ...
banbar's user avatar
  • 969
1 vote
2 answers
2k views

Adding data from Mongo to GeoServer?

I'm finishing my last degree on informatics but I'm having trouble getting Tiles/Layers. I have a DB on MongoDB - with this Schema (GeoJSON) db.stations.insert({ "name": "station 1", "...
Pedro Manuel da Costa Martins's user avatar
1 vote
0 answers
1k views

Plugin for MongoDB in QGIS

I'm developing an application for a client based on Vue and NodeJS. Earlier MS Access database was used and I have migrated it to MongoDB and also to PostgreSQL in case I don't find any plugin for ...
Prashant Verma's user avatar
1 vote
0 answers
341 views

What's the most size-efficient spatial database [closed]

I'm configuring a tile server on Apache Mesos. From all the tutorials I've read, I gathered that PostgreSQL and PostGIS is widely used for this purpose. I learned that MongoDb and MySQL Server also ...
vaishnavi mukundhan's user avatar
1 vote
1 answer
386 views

How connect GeoServer to existing Mongo database? [closed]

I'm trying to connect existing database in MongoDB to GeoServer. I connected Mongo to GeoServer, but I can't see exisiting DB. (which I created early by cmd) However, if I create new db from GeoServer,...
GRM's user avatar
  • 105
1 vote
1 answer
329 views

How to find inner points near to corner of rectangular GeoJSON feature?

This question is in continuation of How to check if GeoJSON feature is in rectangular shape and find corner points? I have a collection of GeoJSON features as Polygon & MultiPolygon which are ...
Farhan Ghumra's user avatar
1 vote
1 answer
2k views

Inserting GeoJson Polygon Coordinates with MongoDB and C#?

I'm using GDAL\ogrinfo.exe to read the tab file which includes polygon/LineString/Point coordinates as a stream using the process. I'll store the coordinates in the MongoDB. My attempt at inserting ...
Max's user avatar
  • 21
2 votes
1 answer
2k views

How to check if GeoJSON feature is in rectangular shape and find corner points?

I have a collection of GeoJSON features as Polygon & MultiPolygon which are saved in MongoDB. Many among them are in rectangular or square shape, while others are odd shaped. How can I find all ...
Farhan Ghumra's user avatar
3 votes
2 answers
3k views

mongo geoIntersects with Spring Data

I created a collection that contains a multipolygon document. I want to write a query in spring data that tells me if a point (lon, lat) intersects the multipolygon. The query in mongoDb is as ...
Alessio Frabotta's user avatar
1 vote
0 answers
224 views

Extract info from adf file into json

I have a .adf file which contains altitude data. Is it possible to read and convert this file in JSON format for a next loading on mongoDB? My directory structure is: SRTM_1km_GRD | --- info ...
Alessio Frabotta's user avatar
2 votes
1 answer
221 views

Draw arrow on the line with Geoserver and Mongodb data

I'm looking for the guide to draw the arrow at end of line in geoserver. So follow this thread (How do I draw the arrow on the line using SLD of Geoserver?), I've made it work with the shapefile. ...
Vietphuong1001's user avatar
2 votes
0 answers
313 views

Geosever : make line string feature from MongoDB collection

I installed the gt-mongo plugin to a geoserver and made a new MongoDB store and here is the collection documents example: { "_id" : ObjectId("5a2543fcccc8fa54bc0822ac"), "loc" : { "...
Ibrahem Negm's user avatar
2 votes
0 answers
180 views

Mongo GeoJSON Compliancy

Does MongoDB follow OGC compliancy standards for GeoJSON objects, or some other standard? I have not been able to find a direct statement on this. A follow up to this is whether there are any tools/...
havenwang's user avatar
4 votes
1 answer
2k views

Problem adding GeoJSON to MongoDB: Loop shares more than one vertex with its parent loop

I am trying to add GeoJSON data into MongoDB, but some of the GeoJSON shapes are failing due to the following error: com.mongodb.MongoWriteException: Can't extract geo keys: ...Loop 1 shares more ...
havenwang's user avatar
1 vote
0 answers
480 views

It is possible in MongoDB do a query order by the near distance to a given GeoJSON point?

I have in MongoDB a collection with GeoJSON Points that represent places of interest like this: { "name" : "Malba", "type" : "Museum", "location" : { "type" : "Point", "...
Pablo Ezequiel Inchausti's user avatar
1 vote
0 answers
497 views

MongoDB: Faster alternative to a basic $geoIntersects query [closed]

I've got a whole bunch of political boundaries defined in a MongoDB collection, which are (as you might guess) very complex polygons, with thousands of points. One of the queries I need to run is to ...
DanM's user avatar
  • 247
2 votes
1 answer
437 views

How can I detect if my linestring is near an OSM node?

If I have a linestring of objects (different from the road OSM XML file) and an OSM XML file that contains nodes and ways (extracted down to roads only), how can I detect if my linestring passes ...
Reiion's user avatar
  • 197
1 vote
1 answer
618 views

Implementation of Esri ArcGIS Plugin Data Source using Monogdb

I worked with plugin data source using file data and it worked fine as given here. For MongoDB I downloaded the code given in GitHub and compiled it and registered it with categories. How can I use ...
user4906240's user avatar
  • 1,078
1 vote
0 answers
349 views

Single-ringed GeoJSON polygon in Mongodb

I've loaded the Census' zip code data into a mongo database. I can query specific zip codes like this: db.zips.findOne({"properties.ZCTA5CE10":"80205"}) db.zips.findOne({"properties.ZCTA5CE10":{$...
Zamicol's user avatar
  • 111
1 vote
0 answers
506 views

MongoDB $geointersecting big polygons!

I'm using mongo to store some geolocalized data, with the goal of retriving them using $geointersect. Specifically I have this document stored in my db: { "loc": { "geometry": { "...
darkpirate's user avatar
5 votes
2 answers
2k views

Error when creating spatial index in MongoDB

I am wanting to use MongoDB for some basic spatial calculations (on some fairly large data), but I get an error when trying to create an index on the US Counties shapefile retrieved from the US Census'...
haff's user avatar
  • 666
4 votes
1 answer
1k views

Load a GeoJSON layer with mixed geometries via QGIS's Python module

I have been able to connect my collection in MongoDB , write and store the collection to as .json file and load the GeoJSON file as a layer by QGIS's Python module unless there are mixed geometries. ...
Nil's user avatar
  • 1,463
2 votes
0 answers
537 views

Using Python-Flask-MongoDB with Geolocation field running on App Engine?

I'm trying to write an app which would act as a address caching API, so basically it needs to store addresses (geolocations) and later on I could query on a random address and radius and get all the ...
Shayan's user avatar
  • 121
5 votes
1 answer
9k views

MongoDB Error Code 16755 - Can't extract geo keys for duplicate vertices and edge crossing

When I try to create an index on geometry db.polygons.createIndex({"geometry":"2dsphere"}), it stops at a certain polygon with the error code 16755. It says it Can't extract geo keys and then either ...
kaoscify's user avatar
  • 981
1 vote
0 answers
428 views

Python MapServer MapScript & Mongo - Use GeoJSON String Vs File

I have been using Python MapScript bindings for MapServer - and they work great. A new datasource for the application I am working on is MongoDB. I have seen mentions of a MongoDB Driver for ...
user890's user avatar
  • 5,705
18 votes
2 answers
39k views

Import GeoJSON into PostGIS

I want to import GeoJSON avaliable in the following dump into PostGIS but I am not able to import it. I already imported geousa data available in this public dump into MongoDB smoothly. Let me know is ...
work_in_progress's user avatar
0 votes
2 answers
548 views

Generate GeoJSON from MongoDB Query

I want to extract my MongoDB query in a GeoJSON format it order to be able to visualize the result. I use Robomongo, which seems to be able to generate a JSON format. After I run the query, this file ...
Menelaos Kotsollaris's user avatar
7 votes
1 answer
469 views

GeoJson structure

I currently designing a table/document database structure and use GeoJson to store points and routes. Currently I choose MongoDb, I will consider PostGIS later. I want to store route info for public ...
CallMeLaNN's user avatar
0 votes
0 answers
2k views

mongodb $geoIntersects query for all documents who's polygon contains a point. no results?

I am trying to find all documents for a point that is within a document's polygon. using mongoTemplate to set up my geo index. mongoTemplate.indexOps(Boundary.class).ensureIndex( new ...
Jeryl Cook's user avatar
1 vote
0 answers
206 views

Storing gdal2tiles output directory in MongoDB, add as XYZ layer in OpenLayers

I am regularly running gdal2tiles.py which generates millions of XYZ image tiles for me. Right now I either store these tiles as flat files on a Windows Server file server or I upload a directory to ...
Dennis Bauszus's user avatar
4 votes
2 answers
1k views

How can I clean/fix polygons in a Node.js application?

I am working on a simple Node.js application where users can walk around an area with a mobile device using GPS. This track is stored as a Polygon, but sometimes (due to inaccurate GPS signals or ...
Stephan's user avatar
  • 151
0 votes
0 answers
720 views

bounding box - generate coordinates

I will be using mongodb database which supports data on an Euclidean plane (not spherical). I will be performing queries which return all points within a box. For the box I need to specify the upper ...
user2924127's user avatar