Can postgis for postgresql support complex geometric types like spheroids?
PostGIS supports spheroids defined in WKT.
For an example, this page's section on ST_length_spheroid shows how the spheroid is defined, as well as using a sample.
As for other complex types - PostGIS supports pretty much all of the GEOS geometry types natively.
There is some functions in postgis that takes a spehorid as an input and I'm pretty sure that you can define your own ( spheroid (or ellipsoid))
http://www.postgis.org/documentation/manual-1.3/ch06.html
Yes it does support Spheroids, and in general PostGIS has much fuller capabilities than the similar offering for MySQL. I use PostGIS for this: www.trailbehind.com.
The PostGIS documentation sucks though.
Related
I am new to Greenplum. I used to work on PostgreSQL with PostGIS extension.
Right now I foudnd out that there is no row_to_json function in Greenplum. Is there any function that is similar to this one? I have to use this function to convert geometries to Feature Collection.
JSON is not a supported datatype in Greenplum.
Here is the current guide on using postGIS in Greenplum: http://gpdb.docs.pivotal.io/4340/ref_guide/postGIS.html
As it stated, Postgres-XL is based on PostgreSQL 9.2 and it should have json data type.
Is there any way to use functions for json datatype as in Postgresql 9.3?
Not easily.
You could probably backport the patch series that added json functions to PostgreSQL 9.3, but some understanding of PostgreSQL's source code and structure would be required, as well as some C programming knowledge.
An alternative would be to hire someone to assist with backporting; see the support page.
With the current Postgres-XL (9.5) you have full JSON and JSONB function support.
I started working with PostGIS in Action. The book shows a bunch of neat graphics created from various queries, but there is no mention of how to get these graphics to show up. The queries are working fine.
All of the tutorials I have found online appear outdated, suggesting, for example, to install plugins that are no longer available. I know I'm missing something obvious, but I have no idea what it would be.
I'm using Windows 7, PostgreSQL 9.3, PostGIS 2.1.
UPDATE
Thanks a lot guys. I settled on QGIS and it works as promised. So hard to pick either answer as they are both brilliant and informative.
There is no built-in GUI for Postgis queries. You have a number of options:
Connect to Postgis directly from QGIS or other GIS package that supports direct connections.
Use ogr2ogr utility to convert to another format such as shp or kml and use ArcGIS, Google Earth, etc to visualize the results.
Write the results out as WKT (well-known text) or GeoJSON and load them into a web mapping library such as OpenLayers. There is an example of a WKT reader here: OpenLayers WKT example. GeoJSON is a format that has gained a lot of traction, as it is very amenable to manipulation in Javascript and hence mapping libraries such as OpenLayers or Leaflet.
If you decide to use the ogr2ogr route, here is a cheat sheet provided by the authors of the Postgis book: http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet
I am sure there are other options, but these are the ones that sprung to mind.
PostGIS has no GUI, it's a database extension and so it's purely backend.
If you want graphicals you need a 3rd party gis application to do that. Some worth trying might be:
QGIS - probably the most popular FLOSS gis application
OpenJUMP - a much simpler although quite limited FLOSS
ArcGIS - most advanced and most expensive
Your book probably has a note explaining where the screenshots come from, try searching towards the back of the book.
Is there any geospatial support available for OrientDB (wether its included or from 3rd party vendors)?
In particular I need the ability to build spatial-indexes on my geo-data.
Since SBTree supports range queries, as I understand it, you could efficiently use the distance() function.
Sources:
https://github.com/orientechnologies/orientdb/wiki/SQL-Where#wiki-functions
https://github.com/orientechnologies/orientdb/wiki/Indexes
https://code.google.com/p/orient/source/browse/trunk/tests/src/test/java/com/orientechnologies/orient/test/database/auto/GEOTest.java
Is Lucene Spatial index you are looking for? See the documentation:
https://github.com/orientechnologies/orientdb-lucene/wiki/Spatial-Index
Do you know a database written purely in Perl with DBI interface?
Or what can be used if there is no MySql or Postgresql installed and I want to use Perl only?
Thank you.
Ok, I just wanted something that can be used with Catalyst.
What about SQLite? DBD::SQLite
I believe DBD::CSV is a simple DBD implementation that uses Text::CSV to persist data to CSV files.
That depends greatly on what you consider "database".
If you just want something to store your data, there's a number of Perl databases avialable. Some are listed here: http://www.perl.com/pub/a/2004/09/12/embedded.html
Tie::File
Berkley DB
SQLite
Please note that despite "SQLite is written in C" comments I saw here, the article explicitly states:
Conveniently, the DBI-driver for
SQLite, DBD::SQLite, already contains
the database engine itself as part of
the module - so installing this module
is all that is required to be able to
use SQLite from Perl.
However, NONE of the above is a real database engine, supporting transactions etc..., although some allow SQL-like query language access
I'm not aware of any real database engines implemented in Perl.
Perl rule 34:
If you can imagine it, there's a DBD
module for it ;)
http://search.cpan.org/search?m=module&q=DBD::&s=1
AFAIK there is no database in pure perl that is relational, it's not really economical; you might look in ACME on CPAN.
Essentially you have two choices: a pure perl module that provides a DBD package that wraps around, for example .txt, .csv, or .xml files.
If there is none, you could also implement a BDB/DBM style system of your own using pure perl, much like Ken Thompson did in C with DBM. It however, wouldn't be as complex as having SQL based relational database.
If you expect to use SQL, use an SQL based database.
DBD::DBM is a pure Perl database driver which is part of DBI itself since version 1.42 (April 2004). It can work with a variety of different database formats using the respective modules, e.g. BerkleyDB or SDBM_File (core module).
One needs to combine this with MLDBM to get a usable database (otherwise ony two columns per table are supported).
The documentation of DBD::DBM is quite extensive and provides a good overview of the different options and how to set it up.