Posts

Showing posts with the label PostgreGIS

Getting started with Raster and PostGIS - I

Image
Steps for loading a raster in PostGIS (PgSql 9.4/ PostGIS 2.2) and pull it from database to view in QGIS 2.14.17. 1. Generate SQL for raster [NOTE: Do not create PostGIS table name starts with underscore, it creates problem while adding raster to QGIS from PostGIS database using DB Manager]         raster2pgsql -s 4326 -I -C -M -F -t 50x50 -N nan biodiv_ssolnw.tif > biodiv_ssolnw.sql 2. Import generated raster into PostGIS database [Make sure to enable postgis extension in db]          psql -h localhost -U postgres -d ecolservicedb -f biodiv_ssolnw.sql the output is: Processing 1/1: ags_473038164.tif BEGIN CREATE TABLE INSERT 0 1 INSERT 0 1 INSERT 0 1 INSERT 0 1 … … …. CREATE INDEX ANALYZE NOTICE:  Adding SRID constraint CONTEXT:  PL/pgSQL function addrasterconstraints(name,name,name,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean,boolean) line 53 at RETURN...

Register Database to ArcGIS server

Image
There are two methods to register Database to ArcGIS Server A) Register via ArcGIS Desktop Double click to ensure ArcGIS Server Instance is connected to ArcGIS Desktop Right Click to Publisher connection to ArcGIS Server Then Click ArcGIS Server Properties to open ArcGIS Server Properies Add Data Store in Registered Databases ESRI Video on Registering database data with ArcGIS 10.1 for Server B) Register via ArcGIS Server Manager Web Interface SOURCE:  http://gisdeveloper.blogspot.com/2014_04_01_archive.html  ( Copied here for my future reference) REGISTER DATABASE TO ARCGIS SERVER While publishing data (from database) to ArcGIS server it gives you a warning that 24011: Data source is not registered with the server and data will be copied to the server How to resolve this ?? Well there are different approaches, here is the one which i followed. But before doing anything Please Note: Note: The client side libraries need to be copied to ArcGI...

Postgresql tips

Start to postgresql :  sudo -u postgres psql postgres List all databases :  \list  or  \l : list all databases \dt : list all tables in the current database Type  \q  and then press  ENTER  to quit  psql Connect to database : \connect database_name Drop all tables from a database:  drop schema public cascade;

Export/Imoprt PostgreSQL database with PostGIS extension

#Run from windows command prompt #Create dump into dump.sql C:\Program Files\PostgreSQL\9.4\bin>pg_dump.exe -h localhost -p 5432 -U username dbnameToExport  > D:\dump.sql #Import dump C:\Program Files\PostgreSQL\9.4\bin>psql.exe -h localhost -p 5432 -U postgres dbnameToImport  < D:/dump.sql Password for user postgres : Only super user can create PostGIS extension in PostgreSQL. Reproject Geometry from WGS84 to Web Mercator Aux ALTER TABLE table_name             ALTER COLUMN column_name TYPE geometry(MultiPolygon, 3857) USING                        ST_Transform(ST_SetSRID(column_name,4326),3857) ;  Linux, import Postgresql dump with Postgresql database: psql - h hostname - d databasename - U username - f dump file . sql

Automated Tools for Integrating Remote Sensing Data Into Spatial Epidemiology Research

Image
Satellite remote sensing provides valuable information that can be used to map infectious diseases and forecast future health risks. However, amassing and managing the geographic information from diverse datasets is difficult and time-consuming. Therefore, there is a need for a geoinformatics system that integrates the acquisition, processing, management, and analysis of geospatial data sets from various sources. Here, we present our software model for automated data capture and processing of satellite remote sensing data for public health applications.  The system incorporates land surface temperature and vegetation indices from MODIS precipitation data from TRMM, and a novel measurement of actual evapotranspiration.

Popular GIS Books

Image
Books Pro Cons It provides solid guide to how geospatial analysis work, particularly with respect to GIS. The book emphasizes conceptual workflows and with basic math which is helpful for creating own code and also getting an understanding of what's happening under the hood in contemporary GIS. It is better to have an update because lots of changes in GIS software over last five years. This book is for typical GIS user aspiring to design good maps. It is illustrating GIS map software and throughout with map samples in color which is especially useful for those who has little prior training or experience in map making. This is acceptable book for beginners but very little information of advanced users. It hardly touches on advanced cartographic representations. This book explains the computational geometry and algorithms concisely and very readable. It emphasis on describing algori...

Spatial Developer must keep in your shelf : Book Review

Image
One of my client’s requirements was to create and open source geospatial DBMS to hold utilities and city shape files. As looking through the internet, I found PostGIS is an open source software program that adds support for geographic objects to the PostgreSQL object-relational database.  As project reference, I choose PostGIS in Action , as project accomplished successfully I realized  my judgment was excellent. PostGIS in Action is a very comprehensive introduction to PostGIS for developers of all levels of experience. Basically it is split into 3 parts: Part 1- Nice and slow startup with PostGIS. You can skip this section if you have prior knowledge about any kinds of spatial databases and geometry data types. Part 2- Put PostGIS in work. It contains technical details on proximity analysis, geocoding addresses, manipulating polygons and lines, and scaling and rotating geometries as well as efficient queries and how to tune your database and selectio...

How to connect spatial database(PostGIS) with QGIS?

Image
In this section, I am showing the 3 basic steps to connect PostGIS database with a widely used open source desktop based gis, QGIS.  Step1: Install PostGIS with Spatial database support extension i.                     If PostgreSQL is already installed è Launch ‘Application stack builder’ from startup menu in windows 7. ii.                   Select the appropriate instance of PGSQL from dropdown list and Click NEXT. iii.                 Expand ‘Categories’ è Expand ‘Spatial Extensions’ è Select appropriate PostGIS version(1.5)  for the already installed PGSQL version(8.4). iv.                     Follow the instructions to inst...

An Interactive Visualization using Geoserver & Openlayers

Image
From last couples of week, I have been involving to develop a interactive web interface for West Nile virus incidence dissemination across the conterminous US from 1999-2011. The image on the right shows one of my accomplishment using Geoserver,Openlayers,jQuery, PostgreGIS,and Google API. The project is about to launch online, then I will post a complete link of the project to let you guys play around it. Click to visit: Web application I am willing to help any one who is stuck with web maps/visualization and also seek constructive criticism on web stuffs.