Tuesday, March 29, 2011

osgeo4w for impaired networks

There has been some discussion going on about the osgeo download server (http://download.osgeo.org) being not reachable from certain networks (for example Italy's main provider Telecom, but also providers from other countries). This also means that the osgeo4w installer is not working right now, even if there is a mirror server (http://download2.osgeo.org) available that would be reachable from those networks (at least the Italian one).

Thanks to Matt Wilkie, there is now a tested (not as my recent desperate failures) way to get to update the osgeo4w packages. It is a bit less userfriendly, since commandline based, but I am sure many will appreciate. I did. Thanks Matt, also for the following instructions!

First some definitions:

%OSGEO4W_ROOT% refers to the installation folder of osgeo4w. In my case the folder is C:\OSGeo4W, which is the default.

Instructions:

1) download the file: apt.py
and save it to %OSGEO4W_ROOT%\bin\apt.py. If the file already exist, you can skip this step.

2) Create in the same folder as 1) a file named apt.bat, which contains the following line:
@python "%OSGEO4W_ROOT%\bin\apt.py" %*

3) Open the Osgeo4w command shell (it can be found in the program menu under osgeo4w) and inside that run the commands:

3.1) To update the list of packages:
apt --mirror=http://download2.osgeo.org/osgeo4w update

3.2) To get the list of available packages:
apt --mirror=http://download2.osgeo.org/osgeo4w available

3.3) To install a package:
apt --mirror=http://download2.osgeo.org/osgeo4w packagename


Full command options: http://trac.osgeo.org/osgeo4w/wiki/pkg-apt


I really hope that can help someone to get its preferred osgeo4w application until the eembargo is over.


PS: the --mirror instruction is necessary only in the first command run

-----------------------------

TROUBLESHOOTING

There might be a couple of problems:
1) python is not installed in your osgeo4w installation (WHAT, NO PYTHON!!!!!???? Where do you live!?!?!? In a java world!??!?! :) ). In that case you will have to install it and then change the apt.bat to refer to your python installation.
In my case I had a python installation on my pc, but non in the osgeo4w installation, so I changed the apt.bat file to be:
C:\Python27\python "%OSGEO4W_ROOT%\bin\apt.py" %*
After that everything worked flawless.

Another option is the http://code.google.com/p/maphew/wiki/OsgeoFromScratch documentation.


2) If the apt update didn't work, try first to run:
apt --mirror=http://download2.osgeo.org/osgeo4w setup

I can't remember if I ran it or not and now it is too late to tell if that did unlock anythig in the begin.

Thursday, March 24, 2011

geopaparazzi 2.3.0 out - the osmdroid integration

Today we released geopaparazzi 2.3.0 to the android market.

This release bring a ton of news and fixes. The two most important are for sure the fixing of some GPS issues, making the gps now faster and more stable. The other is the integration of the osmdroid project as the mapping engine for geopaparazzi. Since the mapping engine needed to get professional finally, we decided to do it properly, and the osmdroid project does that.

Another nifty addition is the support for bookmarks.




Full release notes:

New features:

* integration of the osmdroid project (brings multitouch, minimap, scalebar, enhanced rendering, multiple tile sources...)
* enhanced tools in slider over map
* support for bookmarks

Enhancements:

* enhanced handling of gps status icon
* updated documentation at: www.geopaparazzi.eu
* icons now are properly created for various densities
* possibility to delete notes and bookmarks on the visible map
* better contrast color for chart viewer
* labels properties for better overlay of poi layers
* select/unselect all on data lists

Fixes:

* fix for logs not showing up on map at logging start
* new project was landing in backed up folder
* proper distance calculation in 3d
* gpx support also for gpx 1.0, not ony 1.1

Thursday, March 17, 2011

android and the density of icons with inkscape

When android started to support multiple screen densities, geopaparazzi started to have some problems with blur icons on different devices. I was delaying the creation of the icons at the density for gigh/medium/low density devices... because I didn't know exactly how to do them :)

Well, recently I started the the new toolbox slider for geopaparazzi



and those were looking really ugly at the wrong densities, so I had to face that density thing.

This is how I did it with inkscape, after studying some icons done with the amazing asset studio. As I realized for menu icons for example, they generate for the different densities (assume squares):

hdpi: 72 pixels at 72 dpi
mdpi: 48 pixels at 72 dpi
ldpi: 36 pixels at 72 dpi

With that info my workflow was the following for an icon that I needed to be of size in android = 32 dip:

1) define the sizes I need, assuming that the 32 dip are well fitting with the mdpi mode:
hdpi: 48 pixels at 72 dpi
mdpi: 32 pixels at 72 dpi
ldpi: 24 pixels at 72 dpi

2) inside of inkscape, were I created all the icons, I resize my images to be 48, 32, 24 pt. Please note it is pt, non px.



3) export the images as icons for the different sets in hdpi, mdpi and ldpi in the android app.

an believe it or not, now I have very clear and smooth icons in my application.


--------------------
Update 1:
For an Olitab using 320x320pt at 72 dpi looks good


Friday, March 11, 2011

uDig-dev, uDig's evil brother

Since atm lot's of development is going on in the uDig world, I decided to create a uDig-dev package for osgeo4w:



This one will not be a stable version, but will contain all cutting edge new features.

One example? The georeferencing tool:



But read about it on Jody's post. Oh man, these are fun times :)

Wednesday, March 9, 2011

Mercurial and Git cheatsheet

We are using Git and Mercurial for many different projects. Apart of suffering often of confusion in command usage, I am still trying to figure out tricks and understand advanced features. here I will try to keep a cheatsheet uptodate. Corrections are welcome, as well as comments about how to fill in the gaps. Whatever comes in and makes sense, I will update the cheatsheet.

In this I am not trying to show how that git and hg are the same. I only want to show how common tasks could be done in the two versioning systems. Please be aware that (as some commented) this might create confusion, since there is no 100% same way to do things and branches, tags and whatever do not always have the same meaning in both worlds. So please be careful. I find the cheatsheet useful, so might others

Discussion ongoing in the comments section.


--- update 1: Wed Mar 9 11:22:54 CET 2011

Monday, March 7, 2011

Perhaps not everyone knows that... line tools in uDig

While adding some small tools to handle orientation and moving of features, I noticed that I didn't even remember that I had added the possibility to show a profile of a feature over a coverage (!!).

So I though that if I don't know it perhaps many others might not know.

So here some it is, select a feature and a coverage layer, and it will appear as operation:




If you have to handle lots of data and need to analyse them and move them around, the following tools might also be of use:



View line orientation:




Invert orientation of any 2d geometry:



And moving features one layer up or down:



To help in being really fast, here the shortcuts:

- move features a layer up: Alt-Shift-W
- move features a layer down: Alt-Shift-Z
- view line orientation: Alt-Shift-A
- invert geometry orientation: Alt-Shift-S

Saturday, March 5, 2011

BeeGIS in osgeo4w

As promised we now have also BeeGIS coming with the osgeo for windows installer.

Again, want to try it out? Just run the installer here and search for BeeGIS in the advanced install. The BeeGIS extentions will appear in the uDig istallation.

Friday, March 4, 2011

uDig in osgeo4w again with 1.2.1

After some nice user making me notice that I was laging 3 years behind with the uDig version in the osgeo for windows installer, I wrapped myself up and with the gentle help of the osgeo guys (I had 2 tickets open since 3 years :( ) I got back on track.

The result is that uDig 1.2.1 is available in the osgeo4w installer. I really like the installer of osgeo4w and I will definitely put also BeeGIS as an installation option into it.

Want to try it out? Just run the installer here.