November 13, 2009

Sample WCS request to geoserver 2.0

This is a sample WCS request to be submitted to WCS;

http://localhost:8080/geoserver/wcs?service=WCS&request=GetCoverage&version=1.1.1&identifier=topp:bath&BoundingBox=-74.047185,40.679648,-72.907005,45.882078,urn:ogc:def:crs:OGC:1.3:CRS84&format=image/geotiff&width=800&height=800

October 19, 2009

Great Introductory GIS Tutorial And Screencast Series

http://freegeographytools.com/2009/great-introductory-gis-tutorial-and-screencast-series

Quoted below...
The Department of Land Affairs, Eastern Cape, South Africa has created a terrific tutorial series on GIS called “introducing GIS”. PDF worksheets and video screencasts cover topics like vector and raster data, attributes, topology, coordinate systems, map production and spatial analysis in a clear and easy-to-follow fashion. The worksheets are freely distributable under the terms of the GNU Free Documentation License, while the screencasts are released under Creative Commons. While you can watch the screencasts in your browser, they are a bit small – I would recommend downloading them so that you can open them in a stand-alone video viewer that you can resize to larger dimensions for easier viewing. Right-click on the video link and choose “Save as”. For that matter, if you download all the screencasts and worksheets and put them on a DVD, you have a great educational resource to share and distribute.
The site has a custom Windows installer of the open source GIS Quantum GIS, including the data presented in the tutorials. However, Quantum GIS also runs on Mac and Linux, and they offer the tutorial data as a separate download; find the link at the bottom of the web page. For that matter, the Quantum GIS Windows installer they have is version 1.0.2, while the most recent stable release version for Windows is 1.2.0-1. So even if you have Windows, you may want to download the data separately, and install the most recent version of Quantum GIS using the osgeo4w installer.

October 14, 2009

Nokia Pc Suite error : "ensure your phone is in the Idle state"

I have a newly purchased Nokia E series device, namely E52, which is a nice phone with beautiful synchronization options.
Recently I had some errors during synch which I solved by goint to Control Panel -> Phone -> Synch and changing the synch settings. I had configured ovi synch lately and this was the cause of error as it was set as default. I have changed it to PC suite and the error disappeared.

September 11, 2009

Gdal tools

Saving a portion of a map with gdal_translate

gdal_translate -of JPEG world.topo.bathy.200407.3x21600x21600.A1.png world.topo.bathy.200407.3x21600x21600.A1.jpg -srcwin 0 0 1000 1000 -co "WORLDFILE=YES"

Tiling with gdal for geoserver pyramid serving
gdal_retile -of JPEG -pyramidOnly -ps 256 256 -levels 5 -targetDir piramid world.topo.bathy.200407.3x21600x21600.A1.png

or for Geotiffs;

gdal_retile -levels 5 -pyramidOnly -targetDir pyramid bathymetry.tif

or
gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES"
-co "COMPRESS=JPEG" -targetDir bmpyramid bmreduced.tiff



With geoserver 2.0.2 it is a piece of cake to load this pyramid into geoserver...


Indexing with gdaltindex
geotiffPyramid\pyramid>gdaltindex -tileindex location test 1\*.tif

Creating a 3D image file from elevation data
gdaldem hillshade elevationGeotif.tif elevation.png

Adding overlay
gdaladdo -r average bath.tif 2 4 8 16 32 64 128

Merging geotiffs
gdal_merge -o c:\merged.tif *.tif

Translating a png image to geotiff
You should have a world file for the png file .If you know the bounds of the image and the resolution, you can produce this info from here http://egb13.net/2009/03/worldfile-calculator/.
You can download the image files from here :
http://visibleearth.nasa.gov/view_detail.php?id=7105

and the image bounds are (get more details from readme.pdf) :
[X].3x21600x21600.A1.[Y] 90N 180W 0N 90W 240
[X].3x21600x21600.B1.[Y] 90N 90W 0N 0W 240
[X].3x21600x21600.C1.[Y] 90N 0W 0N 90E 240
[X].3x21600x21600.D1.[Y] 90N 90E 0N 180E 240
[X].3x21600x21600.A2.[Y] 0N 180W 90S 90W 240
[X].3x21600x21600.B2.[Y] 0N 90W 90S 0W 240
[X].3x21600x21600.C2.[Y] 0N 0W 90S 90E 240
[X].3x21600x21600.D2.[Y] 0N 90E 90S 180E 240
An example world file:

0.004166666666666667
0.00000
0.00000
-0.004166666666666667
-180
90
and the tranlation command:
gdal_translate -a_srs wktGeoreferenceFile -of Gtiff input.png output.tif

Example wkt file content(wgs 84) :

GEOGCS["WGS 84",
DATUM["World Geodetic System 1984",
SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4326"]]
Tiling a geotiff to smaller pieces
gdal_retile -targetDir targetdir -ps 2400 2400 a1.tif


Adding overviews to tiffs in a directory using sfk tool
sfk run -yes "gdaladdo -r average $file 2 4 8 16 32" .

Changing data type format of a Geotiff format (eg int16->Float32)
gdal_translate -ot Float32 input.tiff output.tiff


Scaling data in a Geotiff File(eg from meters to centimetes vice versa)
gdal_translate -scale 12615 12731 1.1 2.1  input.tif  WroclawDEM_output_scaled.tif




August 19, 2009

Howto convert geotiff elevation data to esri bil file format?

Use gdal tools, namely gdal_translate[1]. If your geotiff file has spatial specs encoded in it is really easy.

eg;
gdal_translate -of EHdr e020n40.Bathmetry.tif e020n40.bil

The gdal_translate command also creates the necessary bil header files.

[1] http://gdal.org/formats_list.html

Try to view the output with OpenEV.

August 05, 2009

Link Shell Extension

Hardlinks provide the ability to keep a single copy of a file yet have it appear in multiple folders (directories).

Now for NTFS it is possible to define new hard links, junctions etc. It is very useful if you use DropBox and sync different folders.

It is freeware, you can get it from the link below;

http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

July 29, 2009

Installing PostgreSQL and PostGIS - Part 3

Storing some geospatial data.
Following the steps documented in Postgis documentation here.
I have used pgadmin for accessing postgresql but psql will suffice too. I recommend pgadmin as it lets you see the spatial structures much more easily.


Step 1 - Create some normal table

CREATE TABLE roads (
road_id INTEGER,
road_name VARCHAR
);

Step 2 - Add a special column for spatial data

SELECT AddGeometryColumn( 'roads', 'roads_geom', -1, 'GEOMETRY',
 2 );

The 2 at the end of the sql command indicates the dimension of the geometry.

Step 3 - Add some data

BEGIN;
INSERT INTO roads (road_id, roads_geom, road_name)
VALUES (1,ST_GeomFromText('LINESTRING(191232 243118,191108 243242)',-1),'Jeff Rd');
INSERT INTO roads (road_id, roads_geom, road_name)
VALUES (2,ST_GeomFromText('LINESTRING(189141 244158,189265 244817)',-1),'Geordie Rd');
INSERT INTO roads (road_id, roads_geom, road_name)
VALUES (3,ST_GeomFromText('LINESTRING(192783 228138,192612 229814)',-1),'Paul St');
INSERT INTO roads (road_id, roads_geom, road_name)
VALUES (4,ST_GeomFromText('LINESTRING(189412 252431,189631 259122)',-1),'Graeme Ave');
INSERT INTO roads (road_id, roads_geom, road_name)
VALUES (5,ST_GeomFromText('LINESTRING(190131 224148,190871 228134)',-1),'Phil Tce');
INSERT INTO roads (road_id, roads_geom, road_name)
VALUES (6,ST_GeomFromText('LINESTRING(198231 263418,198213 268322)',-1),'Dave Cres');
COMMIT;

You can view the data from some postgis enabled application like uDIG or JGrass.

Related posts:
[1]Installing PostgreSQL and PostGIS - Part 1
[2]Installing PostgreSQL and PostGIS - Part 2

Installing PostgreSQL and PostGIS - Part 2

The previous step was [1].

Now installing postgis 1.4. Actually this consists of copying some dlls and running some scripts for creating spatial datatypes and functions.
My database name is deneme.

Installing

Step 1
Downloaded postgis and unzipped it, copied everything to the postgresql installation directory.
Step 2
Ran some sql scripts using psql. Followed the steps in postgis documentation here...

That was all...

Part 3 is for loading some data...

[1] Installing PostgreSQL and PostGIS - Part 1

Difference between WCS, WMS and WFS

(Writing this entry hoping it makes clear of a novice GIS developer like me)

First the terminology...
WMS - Web Map Service
This service only serves image files, nothing else. You get pngs,gifs, jpgs or tiffs. You can also display coverage data but your actual data is mapped to imagery. For example, in geoserver, you can actually serve bathymetry (elevation including seas) data in geotiff to clients, but your coverage data including elevation is mapped to RGB data in png.

WCS - Web Covarage Service
From the introduction part from OGC 's WCS Implementation Standart Document.

The Web Coverage Service (WCS) supports electronic retrieval of geospatial data as "coverages" – that is, digital geospatial information representing space-varying phenomena.

A WCS provides access to potentially detailed and rich sets of geospatial information, in forms that are useful for client-side rendering, multi-valued coverages, and input into scientific models and other clients. The WCS may be compared to the OGC Web Map Service (WMS) and the Web Feature Service (WFS); like them it allows clients to choose portions of a server's information holdings based on spatial constraints and other criteria.

Unlike the WMS [OGC 06-042], which portrays spatial data to return static maps (rendered as pictures by the server), the Web Coverage Service provides available data together with their detailed descriptions; defines a rich syntax for requests against these data; and returns data with its original semantics (instead of pictures) which may be interpreted, extrapolated, etc. – and not just portrayed.

Unlike WFS [OGC 04-094], which returns discrete geospatial features, the Web Coverage Service returns coverages representing space-varying phenomena that relate a spatio-temporal domain to a (possibly multidimensional) range of properties.

July 22, 2009

Installing PostgreSQL and PostGIS - Part 1

(This post is all about my Windows XP experience... Note that under normal conditions postgresql installer should work just fine, my situation is an exceptional case, I guess )

I have been trying to install PostGIS. I have encountered some issues which may be helpful for others. I have not yet been successfull, as I will update this post as a log of my status.

Take 1 - Downloaded PosgreSQL 8.4 and installed it. Postgresql comes with a tool called Stack Builder which lets you install additional components. Postgis can be installed this way, they say. I have chosen in the list and saw spatial node. Chose postgis 1.3.6 and a mirror service for download. It downloaded successfully, started installing and bingo, it is not compatible with postgresql 8.4. Then why in the hell is it listed in the stack builder at first place.

Take 2 - Uninstalled 8.4, installed 8.3. Same steps... When I ran Stack Builder I have detected that 8.3 server is not running, erronous installation. Uninstalling again, going thru regedit, deleting all keys for postgresql, and trying to reinstall 8.3. Uhhh, not worked again, I guess I will have to restart $%#$%#$%.


Take 3 - Restarted. No change. Now took a different path. I have downloaded the zip file of the PostgreSQL 8.4.1 and unzipped it.

Creating the database
I have created a database using the command line tool createdb;
createdb deneme

Give full rights to this directory for the user postgresql database will run under(in my case this is the user postgres).

Running postgresql
In standart case postgresql can not be run under administrative user for security reasons. For this reason you should use runas command from the command prompt.
I tried to run the postgresql from command line using the command :
postgres -D ..\data and have encountered an error. -D indicates the data directory for the postgresql.

Tried this instead;
runas /env /user:postgres "postgres -D ..\data".
You can use absolute paths here.

That's all.

Related posts:
[1] Installing PostgreSQL and PostGIS - Part 2 
[2]  Installing PostgreSQL and PostGIS - Part 3

June 10, 2009

Setting up World Wind, JOGL and Eclipse Galileo

World Wind lets you zoom from satellite altitude into any place on Earth. It is like an open source Google Earth. To run the examples, and to play with World Wind you should have a OpenGL compatible graphics card. World Wind comes in two flavors, namely for .NET and for Java.

You can download the Java release from here.
For Java you will also need JOGL libraries for OpenGL support. JOGL is in fact JNI interfaces for direct access to OpenGL hardware.

You can get JOGL from here. Choose your platform as it is available for many platforms like linux and mac.

I wanted to compile world wind from scratch. I installed latest release candidate of Eclipse Galileo and created a new java project and used the World Wind src directory as the source.
To compile the WOrld WInd you should add the JOGL libraries as external jars to the project.
This will be enough to compile the World Wind source tree but not enough to run the examples. To run the examples you should point the JNI interface library path to the JVM [1]. Create a "Run Profile" and in the Arguments tab -> VM arguments paste this.

-Djava.library.path=E:\jogl-1.1.1-windows-i586\lib

The path should change according to your JOGL installation directory.

That's it.

References:
[1] http://www.jagoharry.co.uk/using-jogl-and-swt-in-eclipse-java-projects/
[2] https://jogl.dev.java.net/servlets/ProjectDocumentList?folderID=9260&expandFolder=9260&folderID=0
[3] http://worldwind.arc.nasa.gov/

May 26, 2009

Thumbs down for Copernic Desktop Search.

I have been a fan of Copernic Desktop Search over MS, Google for a long time, but the glitches that seemed to be bugs never get fixed. To give an example, I searched for email from one of my colleagues and CDS only lists 6 of them. In fact I have 50+ of them in my Outlook. Somehow CDS ignores them.Maybe I haveto buy the CDS pro version to get my emails indexed properly :).

I had to switch to MS Desktop search, unfortunately. For the emails it seems more robust.

What I liked in CDS was ease of use, ability to show the searched keywords highlighed in its built-in editor, which I can push aside for a reliable functioning.

April 08, 2009

Twitter trends in rss

This is a pipe to get twitter trends in rss format.
Normally you can only get it in json.



Earthquakes of Turkey in the last 24 hours

This is a georss that you can use to view earthquakes in Turkey.

See here in google maps(KML).
Or view it in yahoo pipes map...

The data is retrieved from http://www.koeri.boun.edu.tr/sismo/map/tr/index.html and prepared for yahoo pipes with dapper.

March 26, 2009

Best Firefox add-ons I install at setup

(UPDATED on October 9, 2009)

For del.icio.us bookmarks I prefer this.

For IE specific sites! I install IETab.

For download management I prefer Downthemall.

Not so necessary but Pdf Download is a good tool for handling pdf links.

For Gmail, the following add-ons and greasemonkey scripts have been particularly useful for me while using gmail. First install GreaseMonkey and then Better Gmail 2... Then you install this greasemonkey script for hiding the labels with no unread messages. And of course Remember the Milk addon for Gmail .

For twitter I use twitterfox (although I am not a fan of Twitter in any way).

For decerasing the size of my always open tabs like gmail, FaviconizeTab.

For my tasks, Remember the milk for gmail.

TabMixPlus is a must.

Some following tweaks;
browser.tabs.loadDivertedInBackground -> true.

March 25, 2009

My first Dapp , My first google gadget

Add this to your google gadgets for getting Turkish Super League Football results.

http://hosting.gmodules.com/ig/gadgets/file/109749678153669589349/dapper.mod

March 23, 2009

Billboard releases API!

This is a nice one...

Billboard publishes the most trusted charts and offers unrivaled reporting about the latest music, video, gaming, media, digital and mobile entertainment issues and trends.

The Billboard API puts the entire rich history of our weekly charts at your fingertips to sample and mix into your web pages and applications.

Billboard - Welcome to the Billboard Developer Network!

March 19, 2009

Return of the Firefox ! Till Chrome supports delicious, scribefire, downthemall...

I have been a huge fan of Google Chrome. Still I am. It launches fast, shows pages faster, and maximizes the screen usage. However there are some caveats.

I like del.ici.ous. Very much. My bookmarks in my hands whenever I need them. And the firefox del.ici.ous plugin is great. For this sole reason I have switched from 4+ months friend Google Chrome to my old dude Firefox.

Here is the list of firefox add-on Chrome should support before I switch to it again.

Greasemonkey
ScribeFire
Del.icio.us
Downemall!

My 2 cents.

Microsoft Live Mail Review

Have you tested the Microsoft Live platform for mail, blogs and pictures.
I had.
Short conclusion : Slow. Unresponsive.

Why?
I have tried to download my Hotmail mail with Live Mail. First of all I had to enter my password 3 times.
Then it started to show some of my mail. I click on a mail on the left side list, hoping to see the content on the right side, first three mails ok, then it stalled. I just wanted to delete it. No result. Meanwhile while alt-tabbing I saw a popup windows, showing status of downloading. Hey, you SHOULD show that on a single window.

Even the hotmail web site is more responsier than this desktop application.

Verdict?

Stay away from Live merchandise...


March 04, 2009

OSGi Hello World

I have been encountering this OSGi stuff more frequently lately and this site seems to explain it in simpler terms...


March 03, 2009

February 27, 2009

Installing Flash Player 10 in Ubuntu 8.10


1 - Go to http://www.adobe.com/shockwave/download/alternates/ and download deb file (install_flash_player_10_linux.deb).
2 - Uninstall previous players from synaptic package manager like gnash, libswfdec..., or any other flash related package
3 - Install deb file with sudo dpkg install_flash_player_10_linux.

This worked for me...

February 25, 2009

The Google Maps Image Cutter

From the site :

The Google Map Image Cutter is an application designed to take any
image or digital photo and cut it into tiles which are displayed on a
Google Map. Using this tool, large images can be published on the web
in a format that allows the user to pan and zoom using the standard
Google Maps interface. Although publishing large digital photos is the
most obvious application, this technique can also be used for annotated
maps of an area that are not to scale e.g. directions for how to get to
the office.


Download from:
UCL Centre for Advanced Spatial Analysis

February 24, 2009

How to produce video signal with Atmel

I wonder what Atmel is NOT capable of ?

Video in GCC

Video with Arduino

Font problem in Ubuntu...

I have been using Ubuntu 8.10 for a while now, and I like the experience.
An unsolved issue of mine was the font rendering for qt4 applications. They were not antialiased that looked awful in applications like Opera or Gnome Terminal. The following link offers a solution which worked for me.

http://ubuntuforums.org/showpost.php?p=4683737&postcount=7

February 23, 2009

U2 - Moment of Surrender fake?

I had a opportunity to listen to U2's new album, No Line On The Horizon.

One song especially took my attention , the Moment of Surrender, it is very like the Pink Floyd's Lost for Words from the Division Bell. Not the same but very similar tunes here and there...Especially the chorus parts.

February 22, 2009

Arduino with zigbee

I am slowly becoming a fan of Arduino boards lately. The low price, small form factors looks attractive.

I have found this interfacing circuit while wondering if anyone had already connected an Arduino board and Zigbee wireless device.

What is Zigbee? Zigbee is a wireless networking protocol for low power , low bw applications aimed mostly for sensors. Max bw is 250kbps so it is not a HD movie streaming solution. Zigbee can be meshed.

What is Arduino? Well,Arduino is an open source schematics for an electronics boards with atmel microprocessors. You can buy prebuilt boards from manufacturers or you can solder yourself. It is programmed by Wiring, a port of Processing language for java graphics.

Most of this information is gathered from the following

[1] Arduino
[2] Processing

February 16, 2009

Dealextreme is sick!

You know the site, right? The dealextreme.com . Super cheap web gadgets with free shipping. You can find yourself navigating arbalets, BB bullets, watches, cf slots at the same time. It may suck your time so beware. A friend of mine compiled some other sites with similar content but not a dealextreme.com kicker.

http://tinydeal.com/
http://www.inesun.com/
http://www.focalprice.com/
http://www.extremechinadeal.com/ece/
http://www.gps4buy.com/
http://ledshoppe.com/
http://www.dhgate.com/
https://www.uxcell.com/
http://www.sourcingmap.com/
http://www.chinavasion.com/

I warned you!

February 12, 2009

Arduino on Ubuntu

Make sure you have java installed.
Download arduino for linux...
Extract it...
From a terminal window:
sudo apt-get install gcc-avr
sudo apt-get install avr-libc

January 12, 2009

Free taskbar program shuffle tool


http://nerdcave.webs.com/taskbarshuffle.htm

Update!
Rather than the above program I find Taskix much more convenient. Give it a try.