More reliabe VMware Console?
So VMWare server is an interesting product for virtualization. It does some things really well (Like letting you open a desktop OS without installing remote desktop tools) and seems to just fail at others (like a web management tool that you can't get into 1/2 the time).
Tonight's frustration, lack of support for Firefox 3.6. But there's a bit of a workaround. If you go into about:config and find security.enable_ssl2, and set it to true the Web Access site actual seems to work reliably (so far).
However the console to any VM will always timeout. To work around this:
- make sure you've installed the console plugin
- go to your firefox settings directory
- find your way into your profile/extensions/VMWare.../plugins
- way down here you'll find a vmware-vmrc
- to be safe enable execution permission on this and all the other vmware scripts in this folder, in the bin(vmware-vmrc) and in lib (wrapper-gtk24.sh) folders in this directory
- now you can directly call, setup a shortcut or start vmware-vmrc
Linux: vmware-vmrc -h [<hostname>:<port>] [-u <username> -p <password>] [-M <moid> | <datastore path>] Windows: vmware-vmrc.exe -h <hostname>:<port> [-u <username> -p <password>] -M <moid> | <datastore path>
- if you leave off command parameters it will just ask you in the GUI
The port number is really important, no idea what moid is yet. And walla it seems to work. It also seems to be more reliable than the web interface (note there is a tool in the web interface to create a shortcut that does the above, and big surprise it doesn't work in Firefox 3.6 hence the hack around).
Website Shuffle
Some of you may have arrived here looking for my photos. That site is temporarily down while I shift some things around, upgrade some servers, and come up with a better long term plan of what I want to do.
As it was, I hadn't added any new photos for several years and that seemed quite silly. Primarily because it was a technical issue; who knew moving 100 of photos onto a decent web server where visitors can browse efficiently would be so confusing.
Anyways, be patient, let me know if you have questions. tech at wildintellect dot com
NACIS 2009 Opening up
So at the AAG Conference last year, we ran an OSGeo booth. Some representative from North American Cartographic Information Society ( NACIS) approached and invited us to their conference.(It wasn't the 1st time after one of my talks on FOSS previously I had been asked).
Now the important part, the California Chapter gave a 50 minute, 4 app demo at the NACIS "Practical Cartography Day" to an audience of 150. Details Take home message - Cartographers want good svg output.
Notes from the rest of the conference, "Open" was actually mentioned a lot. Here's a rough breakdown of the frequency of relevant topics(In presentations):
- Postgis ++
- OpenLayers(not by name but showed up in slides and on demo sites) +++
- mapnik ++
- GDAL +
- Modestmaps
- php +++
- OpenSource +++++(Even ESRI)
- Python +++
- OpenStreetmap ++++
- Flash/Flex +++++++
- OGC +
- Inkscape +
- GIMP +
- WMS +
(Maybe I'll post a plot when I get chance)
Next post: Some new public domain datasets people are going to want to get their hands on...
Desktop Open Source goes mainstream, old school style
Congratulations to Gary Sherman who's recent book has successfully made it to the shelves of academia. Well that might be in part to our librarian taking advice on what open source gis books are missing that should be on the shelf.
Lucky for everyone else, since the publisher didn't classify it as a text book
it's also affordable too if you want your own copy, paper or ebook.
Desktop GIS: Mapping the Planet with Open Source. Pragmatic Bookshelf, 360 pages, ISBN 1934356069, http://www.pragprog.com/titles/gsdgis/desktop-gis
Wondering what other books you've missed see the OSGeo Library
Inkscape to Scribus to PDF document production: How to make a flyer
It's comes up quite often that I need a flyer for this or that. Just a few pages, sometime quarter, third or half sheets for putting up around campus for people to see. Once you do a few though, it often happens that you just need the same thing again later with a few minor variations. Sure you could just do it all in one application, but when not doing full pages then you have to keep messing with duplicating your information 2-4 times on the same in a way that lines up well with being cut.
This is where layout comes in handy, more specifically I use Scribus. The idea here is make one image and then replicate it multiple times across a page all at once evenly. Well that and make a high resolution ready to print PDF.
So start by making your image/item. In this case I don't have a ton of text and it's kinda free float style (not paragraph) so I used Inkscape, well that and it's the format the flyer was originally given to me in. Had there been more text I would have started with OpenOffice, done the graphics in Inkscape or Gimp and done 100% of the layout in Scribus.
After writing the text, changing and scaling fonts, putting in the image, adjusting transparencies and background colors it's now time to export the image. From Inkscape particularly exporting to bitmap(png) gives you the chance to specify you dpi and ensure it will show up correctly when you insert it in to other documents. For printing I usually use 300dpi, and in this case to cut out dealing with margins only exported the drawing, not the page.
In Scribus:
- Now I set a guide to split the page in 1/2.
- Turn on guide snapping and grid snaping.
- Draw an image box, snapping it to the guides.
- Get picture, grab the png export
- Duplicate(copy) and snap a second one onto the bottom 1/2
- PDF export, no compression
And walla, the next Linux User's Group of Davis Installfest flyer is done.
See Attached:
- Inkscape svg
- Export png
- Scribus sla
- Final Product pdf
Network analysis using GRASS
I ended up wanting to analyze commute paths on several networks, but instructions on how to properly prepare a network file with new points snapped to it as nodes was a little less than clear. I'm not 100% sure this is right but it is pieced together from the command history GRASS stored with each layer in my mapset.
#bring the layer in v.in.ogr -o dsn="/scratch/congelton/davis_ped_net/ped_net_sep28.shp" output="pednets28" min_area=0.0001 snap=-1 #find the nearest line to a point and create a line that connects them v.distance -p from="davissubset@PERMANENT" to="pednetsep28" from_type="point" to_type="point,line,area" from_layer=1 to_layer=1 output="ppl2pednet" dmax=-1 upload="dist" column="dist" #add categories to the distance lines(I think this is required otherwise v.net won't work later, if the cat column is already populated then you can skip this) v.category input="ppl2pednet" output="ppl2pednetcat" type="point,line,boundary,centroid,area" option="add" cat=1 layer=1 step=1 #patch the distance lines to the to the original points, so you have the nodes for v.net v.patch input="ppl2pednetcat,pednets28" output="pplpednet" # patch the distance lines to the network v.patch input="pplpednet,davissubset" output="pplonpednet" #I ran a clean before I did the actual v.net command to make sure I dropped things that wouldn't work, outliers v.clean input="pplonpednet" output="pplonpednetclean3" type="line,point" tool="snap,break" thresh=3,3 #run the network shortest path using the original points as starting points and end points in batch from a csv, the point id is it's cat v.net.path input="pplonpednetclean3" output="dcommute3" type="line,boundary" alayer=1 nlayer=1 file="pplonpednetclean.csv" dmax=1000 #example of the csv #autonumber,Start node cat, end node cat 1 1 3000 2 5 3000 3 6 3000 4 7 3000 5 8 3000 6 9 3000 7 10 3000 8 14 3000 9 15 3000 10 25 3000 11 26 3000 12 27 3000 #yes all my people traveled to the same end point
Things to watch out for:
- A network file should have both lines and points with the same layer number(ie 1_points 1_lines)
- A network file with no cat column in the points component
Reshape R - long to wide conversion
--May be incorrect, working on a fix will post when done-- Keeping data in long format just makes sense, but for some reason statistics often requires your data in wide format. The good news is that it's much easier to go from long to wide than the other way around. Although the tool I'm about to describe can go both ways.
Using R and pulling a dataframe in from an SQLite database the following command will take the dataframe and for every Species listed create a new column based on it. Then all the records are grouped by their Plot and the resulting Percent Cover for a given species in a plot is now a value in one of the columns instead of it being it's own row.
Plant (the data.frame)
| Plot | Species | PrCover |
| A | Poppy | 5 |
| A | Redwood | 20 |
| B | Oak | 50 |
| B | Poppy | 10 |
WidePlant <- reshape(Plant, v.names = "PrCover", idvar = "Plot", timevar = "Species", direction = "wide")
WidePlant (the results)
| Plot | PrCover.Poppy | PrCover.Redwood | PrCover.Oak |
| A | 5 | 20 | NA |
| B | 10 | NA | 50 |
The documentation is kinda hard to read, so here's my attempt at plain english
- v.names = the values you want to show up under your new columns
- idvar = the id that you want to group your data record by
- timevar = the values that you want to make up the new columns, however many distinct values are in this column determines the number of new columns
- direction = wide, the destination or resulting format we want
Installing Sqlite 3.6.x on Ubuntu Intrepid
I needed sqlite 3.6 or newer for an application I'm working on but Ubuntu Intrepid has 3.5.9, specifically for Rtree spatial indexes. (In order to build and use Spatialite.
After weighing my options and doing a little research I noticed that the Jaunty packages barely have any dependencies and they are already met by Intrepid.
So I downloaded:
Steps to follow:
- Uninstall libsqlite3-dev 3.5.9
- Install libsqlite3 3.6.10
- Install libsqlite3-dev 3.6.10
- Install sqlite3 3.6.10
To test with python(happens to be what I'm developing with)
from pysqlite2 import dpapi2 as sqlite3 print sqlite2.sqlite_version
Grass Syntax Hints
Short Story
GRASS GIS command line syntax can be a little tricky and none of the graphical interfaces seem to make it easy because there's always some option you need that isn't on the GUI.
Importing a shapefile
v.in.ogr dsn=/path/to/folder/ layer=nameofshp output=giveitaname
notes: don't put .shp on the layer name, If it complains about not being the right projection but you know it is add a -o (no that's not a zero)
Long Story
I was testing out QGIS 1.0 and the grass toolbox v.in.ogr was having issues, without giving me an useful error message to work from.
So I compiled the latest grass release (6.4 RC2) and tried the new wxpython interface which also failed.
Lucky for me the good ol command line worked once I gave it all the info it wanted in the proper syntax.
SQLite and ODBC for Data Entry
The one downside of all the good database systems is the lack of an easy tool for entering data, especially coding in data off of hand written field forms.
I recently revisited the idea of using Open Office Base or Access as a front end to better databases. In this particular case due the number of issues and my familiarity I got Access working, I plan to go back and also get OOo working next chance I get and taking over my friends windows box (The data entry is for her anyways).
Tools: sqlite-odbc driver (I tested it on Windows and Linux) An ODBC client: Access, Excel, Open Office Base, Calc
Issues:
- All your tables must have a primary key declared.
- If you don't have one it's real quick using the Firefox SQL Manager to fix that, however you have to make new tables), something like this.
CREATE TABLE NewData (pk INTEGER PRIMARY KEY AUTOINCREMENT, Afield, someotherfield); INSERT INTO NewData (Afield,someotherfield) SELECT * FROM Data; DROP TABLE Data; ALTER TABLE NewDATA RENAME TO Data;
- If you don't have one it's real quick using the Firefox SQL Manager to fix that, however you have to make new tables), something like this.
- Declaring field types as TEXT, Access will import them as blobs if you do and this makes linking the tables difficult. Just drop the type.
- The Relationship tool in Access and Open Office are useless with linked-tables in this case. OO tells you so, Access doens't.
- To get around this I created nested forms each based on 1 table. When inserting a nested table into another I built in the relationship to the form so that for every record in the parent child records would be matched automatically.
More details to come soon...
List of useful links:
- a
- b
Ever wonder what's in the box without, shutting down and crawling under...
A few helpful commands I'm collecting to figure out what's inside the machine from the Command Line Interface (CLI):
$ sudo dmidecode | more #A readout from your motherboard, give you name, model, which ram slot's have chips etc.
$ cat /proc/cpuinfo #What processor do you have?
Setting up Trac, getting past the errors.
So I thought the install would go smooth but a few hiccups always creep in.
Basically I followed these instructions and another page for authentication
With some diligent work I worked through: (make sure to look at your apache logs, mines at /var/log/apache2/error.log)
- mod_python is the way to go in terms of setup, speed etc.
- Get an IOError: zipimport: go check the permission on the mentioned file, make sure it's at least 644
example:
sudo chmod 644 setuptools-0.6c9-py2.5.egg
- Python Option and Set Env PYTHON_EGG_CACHE flat out didn't work for me though as reported and worked around, although a fix to the code eludes.
- Import Error on compat, take a look at this ticket
Welcome to Wildintellect's Blog
Hello and welcome to my blog and code hosting site. If you're looking for my photography that's hosted at http://www.wildintellect.com on Plone.
Alex aka Wildintellect
Just started, will it work
Well, I've got it installed. Not 100% configured yet but we'll see if this manages to work as a decent blog platform.
For those curious I'm using the FullBlogPlugin with a Trac site. Not exactly meant for a blog, but it will let me post code snippets and downloadable applications I write, including python eggs.

rss

