GEO Server: Can I connect GEO Server with any geo Spatial database by adding data store? - gis

I want to connect GEO Spatial Database with GEO Server.
GEO Server is not provide out of the box facility for the same. But i want to know the possibility to connect GEO Server with other GEO Spatial database by adding new data store through GEO Tool.
I have seen one answer here stating this can be possible to develop one mimicking the existing stores for existing spatial databases

Related

Can Mysql interact with Elasticsearch To Find Match?

I have a wordpress website with mysql database of real estate properties listed for sale and an elasticsearch database of addresses I have curated.
Can the mysql query the elasticsearch database to find if there is a matching address then send back to wordpress to move the property into a "xyz" category?
If not does anyone know a way for this type of process to happen?
Thanks
I don't know of any way MySQL can interact directly with ElasticSearch.
Typically you would develop code to interact with both ElasticSearch and MySQL in turn. This would be done with two separate queries. The first to query ElasticSearch to find a matching address, and then a second query against MySQL, using the information returned by the first query as a parameter for the MySQL query.
WordPress in this context is a client application for both MySQL and ElasticSearch. But each has its own protocol and connector. MySQL and ElasticSearch don't share data or queries.
Update: I found a way to use an ElasticSearch data source via MySQL's FEDERATED engine through a proxy that translates MySQL's protocol into ODBC to the ElasticSearch node. This is probably way too complex for your needs, but it is possible. See https://www.cdata.com/kb/tech/elasticsearch-odbc-mysql-federated-tables.rst
By analogy, this is like asking "can I drive my car while making my car drive another car?" Yes, you can — just weld your car's steering rods to some long metal struts that operate the hands of a puppet version of you sitting in the other car.
I don't recommend it.

Best way to store GPS latitude and longitude with nodejs and database

I would like to know what is the best way to store information about the GPS position of the device in real time using NodeJS and some database server.
Example:
Currently there are 5,000 devices connected to the server, each of these devices is sending information about their GPS position with a maximum timeout of 1 seconds.
Approximately per minute the NodeJS server will be receiving 300,000 PUT requests.
Too much request, I know it.
Another important factor to take into consideration is that the database server is technically another server or instance.
By the way, I plan to use Amazon AWS or Microsoft Azure as a cloud server provider.
So my question is, what is the most efficient way to store this information on realtime?
Among my options are MySQL, MongoDB, PostgreSQL, etc.
They could explain why it is better to use the option you recommend.
Thank you!
i would say - MongoDB.
why i would say that -
MongoDB offers a number of indexes and query mechanisms to handle geospatial information. You can easily Store your location data as GeoJSON objects with this coordinate-axis order: longitude, latitude.
MongoDB also recently included support for additional GeoJSON types: MultiPoint, MultiLineString, MultiPolygon, GeometryCollection.
MongoDB also offers a vast set of query operators that allows you to easily query over the geospatial data such as:
$geoWithin
$geoIntersects
$near
a typical example would be
{
location: {
type: "Point",
coordinates: [40.7829, 73.9654]
},
name: "Central Park, New York City"
}
You can go over a wide range of examples at https://docs.mongodb.com/v3.2/tutorial/geospatial-tutorial/
Lastly, MongoDB let you build a 2D indexes on the geospatial data. looking at the usage you mentioned. it should come handy.
As already say MongoDB has exactly all the needed in one place.
For the Index side, you can also consider "Partial Index" in order to exclude document that you don't need anymore (take in consideration all the Document less then 12 months only, for example): https://docs.mongodb.com/v3.2/core/index-partial/
For the Cloud side, i strong suggest you MongoDB ATLAS.
https://www.mongodb.com/cloud/atlas/pricing

mySql Database security

I have a database security question. Here is my scenario:
I have a CodeIgniter app with an associated mySql database (main) on a private internal server
There are several satellite applications which need a subset of the data in the main database
It is imperative the data in the main database isn't compromised. My thoughts were that I need to mirror these subsets of the database in a public location where the satellite apps can access it. This way the communication is unidirectional.
What is the best way to achieve this? What other security measures do you recommend to protect my databases?

What database and java library to use for Spatial Analysis?

I have been working on a web project that stores locations for users. The project uses currently MySql 5.5 and JPA 2 for mapping the relation database, together with EJB 3.1 as the middle tier. I store longitude and latitude data in Decimal data types in MySql.
I want to expand the project so the user can search for Points (GPS coordinates) near the location he/she marks out (through using Google Map API 3) on the map.
I need some hints and suggestions before starting transforming or changing components in my project. If possible with tutorial and how to achieve the changes and what tools (library, dev tools, etc.) to use. Here are my questions.
Can I use the Spatial extension in MySql (using data types like Point) and map this to entities that are supported by JPA 2 (like DataNucleus library, if they are supported by JPA 2). That are light weight and can persist them self through the persistent layer.
Is it better to move to PostGIS and Postgres (which seem to have better spatial support) with all the pain and effort needed to change database and using hibernate instead. Netbeans has Hibernate support but when trying with the JDBC for PostGis I stumble upon problems. Need a good tutorial to follow to get started if I go down this road.
Using the infrastructure that is already in-place and compute the distance from lactation A and B. Similar to the way done in this article by Jan Philip Matuschek
Excuse me for clustering the questions.
Regards Chris
MySQL's Spacial extension is usually OK if you only have point locations, but it starts to get overwhelmed if you want to find points in polygons (i.e., query by region), or use fancy indices and search algorithms. There is a really good cross comparison to help show the differences between the different spatial DBs.
I'd see that there are many more benefits to migrating to PostgreSQL and PostGIS. There are also many more GIS applications that work naively with PostGIS, such as QGIS, Geoserver, etc. The most recent version of PostGIS has a KNN nearest neighbor search operator to quickly find, for example, the nearest 25 points out of several million rows to a particular point on your map (see also here).
See the manual for JDBC and PostGIS. As for JPA, see PostGIS and JPA 2.0
As for distance calculations, see ST_Distance and ST_Distance_Spheroid.

Querying database using geographical areas/points

I'm new to the concept of GIS in databases and am looking for a solution that allows me to do the following:
- store polygon areas in a record field
- Store geographical points. These points will contain latitude and longitude coordinates (GPS).
- query database for all records, whose polygons intersect with a given point.
- query database for all records, whose points intersect with a given area
Any recommendations?
thanks,
Fbr
PostGreSQL with the PostGIS extension. Free open source, very mature.
SQL Server 2008 has built-in Spatial Extensions. Even in the free Express Edition.
Oracle
MySQL 5.6.1 or later has built-in spatial extensions.
More information here on different spatial databases and here on learning about spatial databases