Postgis - How to get the GUI to work? - postgis

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.

Related

Semantria Integration with DB

I need to know, has someone integrated any DB to Semantria, and get output to any DB or excel or text file ?
I have tried to explore semantria via excel and API , but integration does not work perfectly.
It depends on what kind of integration you're looking for.
I have already done many integrations with different storages including indexing services and RDBMS solutions.
Unfortunately there are no ready-to-use components available on the market, so you will need to build integration by your own.
Semantria offers SDK (https://github.com/Semantria/semantria-sdk) for all modern languages, you will need to build a logic that will get analysis results and will save them to a certain storage.
Can you please explain what storage do you use and what Semantria output you're interested in?
Thanks George.
Well at the moment, we are just focusing on pulling the data from DB (take for instance mySQL, or Oracle), and output should again go back to same DB, i will take care of transformation needed in o/p.
Now where I am stuck, is the place where I can set up a link between DB and semantria, how will these SDK help, never worked on something like this.
A brief on this will surely be of great help

Software packages to create graphs or charts from a database full of numbers?

I have a device which generates a bunch of statistics once per second. All of the statistics are stored in a PostgreSQL database on a Ubuntu server.
I'd like to create a web interface to prompt the user for a time range and which values to graph. I'm also thinking this kind of thing is common when people have databases full of numbers, so it must already exist. Problem is I don't know what terms to google to find relevant software packages. So far, the only 2 I've found are php5-rrd, and Carbon/Graphite.
The PHP5-RRD solution seems simple enough, though I'm worried I'll be needlessly re-inventing the wheel. Can anyone recommend other similar software packages that can help generate a bunch of "live" charts or graphs with a web front-end?
Try this d3.js tutorial. Depending on your needs it might solve your problem with a way simpler solution than whatever you were thinking.
Edit: if you want to learn the very basics of d3.js, I recommend Scott Murray's tutorials.
Depending on your needs, you can try:
BIRT
Saiku
Shiny (RStudio)
Or you can google charting library or try something from this article
Instead of storing things in a heavy PostgreSQL database, I did eventually change my app to use RRD (round robin database). Lots of ways to easily get and store information in RRDs.
# on Ubuntu:
sudo apt-get install rrdtool
Once I had my RRD files, it was trivial to use the usual RRD tools combined with PHP and the free Google Charts to generate the many different graphs I needed. Google Charts by itself is an amazing project worth highlighting: https://developers.google.com/chart/

Any solution as how a database version tool should be?

I am trying to making a tool which can help in maintaining data base version(like maintaining source code version). The technology which I am thinking to use is spring-hibernate so that the tool can be web based and it can be used by multiple project . The idea is that any database change can only be triggered with the help of this tool,so that the database version information can be maintained and the database can be made consistent .Operations like commit,roll back,branching,merging should be possible. Can you suggest me that how should I approach to this problem?
I have found an opensource tool called LiquidBase which has already provided some sort of solution in maintaining database version. Here is a short preview on what this tool can do. But this tool has some limitations like it does not handle stored procedures and triggers and it works on the basis of an XML file . But I think I can integrate this tool with my requirement and I can speed up development. If you have any other tool in knowledge which can be better than this then please let me know.
If possible tell me that how the tool should be organized so that different project can easily maintain their database version. What all problem the tool should try to address and what minimum support should at least be there in this tool? What should be the UI so that user should be easily able to use it.?

Advice on learning about web applications

I know how to write programs in Java and C++, and would like to learn how servers, databases and Internet based applications work so I could start developing them.
Where should I start? What should I learn first? What books would you recommend for me?
Thank you, in advance :)
I would start by either trying Tomcat which would let you create fairly basic web applications. I would start by playing around with either servlettes or JSPs. There is a lot documentation and examples.
Or you could start by downloading and playing around with a database. PostgreSQL is really good. It is free and they have a tool called pgadmin which is a really good ide.
Once you have been able to get these set up and working I would then start taking a look at some various frameworks that exist to make using these tools a lot easier. For example, you could take a look at Guice or Spring for dependency injection or a range of other tools. This is a comparison of each.
You will also probably want to also look into Velocity, Freemarker, or struts, or something similar. These will make your life a lot easier.
For the database you could look at: Hibernate or MyBatis, both are really good and function slightly differentially. Hibernate is very commonly used and they cache objects very efficiently.
I don't know what you mean by "cells", anyway you may start from open source technologies and their online docs, like Apache, MySQL, and PHP.

Bugzilla Reporting

Is there a really good free tool for BugZilla reporting? I am finding the default search options on the web interface far too limiting. My biggest issue is with the lack of Order By options (only 1 field at a time, and a very limited set of fields to choose from). I have done some Google searches, but I can't find any good free BugZilla reporting tools.
If there isn't one, can someone please point me to an example on how to access the BugZilla web services? If I can get the BugZilla data, then I can easily build my own reports that will better meet our needs.
Take a look at this: http://www.faqs.org/docs/bugzilla/dbdoc.html
Use this database schema for reference: faqs.org/docs/bugzilla/dbschema.html
If you need a web-interface, use your favorite dynamic website scripting language that can access MySQL databases (say PHP)...
Simple-ish Tutorial: freewebmasterhelp.com/tutorials/phpmysql/4
PHP MySQL API Reference: php.net/manual/en/ref.mysql.php
Then use SQL queries such as:
"SELECT * FROM bugs WHERE WHERE bug_status != 'RESOLVED' ORDER BY creation_ts ASC, votes DESC LIMIT 50"
which lists first 50 entries of unresolved bugs ordered first ascending creation time then descending by number of votes.
I have used this in the past and have liked it a lot: http://www.mediawiki.org/wiki/Extension:Bugzilla_Reports
You can also consider other tool eg mantis
(http://www.mantisbt.org/)
I've personally switched from Bugzilla into Mantis and installed some plugins (http://deboutv.free.fr/mantis/) and found this more comfortable
If you are a Java user, you might want to check out Mylyn for eclipse. This is integrates a task-driven development approach into eclipse.
With that, you can raise bugs, tie together SVN changes and bugs, and hide classes that are not relevant to fixing bugs, etc. It's a bit involved to get started with, but quite powerful.
It also comes with a connector for BugZilla. See this introductory article for an example.
If you don't use eclipse, but you do use Java, then note that since Mylyn is open-source, you might want to look at the source code of the Mylyn BugZilla connector for how they do their work.
Good luck.
You can try Deskzilla (http://deskzilla.com/) - it is a multi-platform desktop client for Bugzilla with Outlook-like interface, rich reporting and filtering capabilities, offline work, drag-n-drop, etc. It's a commercial product, but if you're working on an Open Source project you can use it for free.
AFAIK Bugzilla uses MySQL database for storing data. So probably you can connect with some visual db manager (plenty of it exists, see Toad Data Modeler, DbVisualizer) and try do do some sql work...
There is a list of some add-ons (free and commercial) listed on the Buzilla addons wiki.
If you are a Windows user, MyZilla is a possible option.
Otherwise, to work toward your own, see the Bugzilla API documentation, which, in a way, includes how to retrieve the current schema (Bugzilla::DB::Schema), and Bugzilla::WebService.
Netbeans also has Bugzilla integration (I haven't tried it...).
I have analized a bunch of bug tracking tools.
You can try track or mantis, because bugzilla is very unfriendly about reporting.
Mantis
Mantis can export data in excel: all the graphic you need can be generated by that sheet.
For more information take a look to my blog:
http://gioorgi.com/2008/bug-tracking-mantis/
Anyway, Track is used a lot more, so for sake of completeness I should cite it:
Track
Pros:
Can Also work with an embedded database (using sqlite).
Easy to setup and use.
Cons:
Feature are too much, and aims to be also a CMS to some extend.
Take a look to:
http://gioorgi.com/2008/bug-tracking-trac/
Since Bugzilla can be installed on your own server, I presume the simplest way is to do that and play with the databases it creates ("Bugzilla supports MySQL, PostgreSQL and Oracle as database servers"). The documentation also says you can modify the templates as you like.
Otherwise one could try paid support or some other bug trackers.
I use this bookmarklet and like how it searches right with the strings entered in the location bar like smart search. It lets you quickly search bugzilla or jump to a bug number via Bugzilla Quicksearch, and is IE6+, Moz, Op7+ compatible.
Its companions on the same page can be used to refine or help with bug search/report, e.g. collect buglinks (queries bugzilla to show a list of bugs linked to from the current page),ord buglinkify (turns all numbers on the page into bug links).

Resources