Thought Patterns

Everything Java Apache Geospatial Open Source. Hello Shinning Stars!!! Vincent Massol, Raphael Luta, Santiago Gala, Carsten Z.

Saturday, May 12, 2007

The bug is a critical part of our lives. Without her we would be stranded on a Maine-land peninsula with the seals.
Posted by Picasa
This is the Otter house. Mila and Liam go there on fridays to socialize with some of the local kids. When we go and pick them up they refuse to leave. Mila is saying so many words in english. Today she said 'this is papas hat' and 'dinnnnnnner!'
Posted by Picasa
Mum Mila and I are on the beach in front of their house.
Posted by Picasa
Pat and Anne are on their way to graduation. Pat is a assistant professor in mathematics and Anne is a massage therapist and personal coach.
Posted by Picasa

Sunday, April 22, 2007

Concerning MapServer config files there is a lot of grunt work necessary to configure a new set of data using an existing map design. The map file is just one part of the configuration. One needs to set up query templates and initialization files. The majority of this work can be done by using some simple tools for reading shape files.

find /cygdrive/c/GIS/MarionCoIL -name "*shp" > shapefiles.txt

This find command gives us a list of all shape files in a given directory. We want to find all the attributes for each shape file so we use the ogrinfo command.

ogrinfo -summary C:\GIS\MarionCoIL\GISData\ALI Census > Census.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\ALI Tiger > Tiger.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\Delivery Streets_Geo > Streets_Geo.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\Delivery Streets_Proj > Streets_Proj.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E Airports > Airports.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E centraliadissolve > centraliadissolve.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E clippedstreets > clippedstreets.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E Hydrology > Hydrology.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E JeffersonCounty > JeffersonCounty.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E landmarks > landmarks.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E Rail > Rail.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E tgr17121cty00 > tgr17121cty00.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E tgr17121plc00 > tgr17121plc00.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E TigerRoads > TigerRoads.txt
ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E WashingtonCounty > WashingtonCounty.txt
ogrinfo -summary ogrinfo -summary C:\GIS\MarionCoIL\GISData\NAD83E Water > Water.txt

The above script will write a file for each shapefile containing the attributes. The following is an example of the output.

INFO: Open of `C:\GIS\MarionCoIL\GISData\NAD83E'
using driver `ESRI Shapefile' successful.

Layer name: Hydrology
Geometry: Line String
Feature Count: 2238
Extent: (752169.261907, 658660.185483) - (881047.118353, 786642.635521)
Layer SRS WKT:
PROJCS["Custom",
GEOGCS["GCS_North_American_1983",
DATUM["North_American_Datum_1983",
SPHEROID["GRS_1980",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",984250],
PARAMETER["False_Northing",0],
PARAMETER["Central_Meridian",-88.33333333333333],
PARAMETER["Scale_Factor",0.999975],
PARAMETER["Latitude_Of_Origin",36.66666666666666],
UNIT["Foot_US",0.30480060960121924]]
TLID: Integer (10.0)
FNODE: Integer (8.0)
TNODE: Integer (8.0)
LENGTH: Real (10.5)
FEDIRP: String (2.0)
FENAME: String (30.0)
FETYPE: String (4.0)
FEDIRS: String (2.0)
CFCC: String (3.0)
FRADDL: Real (11.0)
TOADDL: Real (11.0)
FRADDR: Real (11.0)
TOADDR: Real (11.0)
ZIPL: String (5.0)
ZIPR: String (5.0)
CENSUS1: String (1.0)
CENSUS2: String (1.0)
CFCC1: String (1.0)
CFCC2: String (2.0)
SOURCE: String (1.0)

We are only interested in the end of the file so we use grep with a regular expression to get only the lines containing attribute names.

grep -e ": [Integer\|String\|Real].*([0-9]*\.[0-9]*)" Hydrology.txt

This results in the following output.

TLID: Integer (10.0)
FNODE: Integer (8.0)
TNODE: Integer (8.0)
LENGTH: Real (10.5)
FEDIRP: String (2.0)
FENAME: String (30.0)
FETYPE: String (4.0)
FEDIRS: String (2.0)
CFCC: String (3.0)
FRADDL: Real (11.0)
TOADDL: Real (11.0)
FRADDR: Real (11.0)
TOADDR: Real (11.0)
ZIPL: String (5.0)
ZIPR: String (5.0)
CENSUS1: String (1.0)
CENSUS2: String (1.0)
CFCC1: String (1.0)
CFCC2: String (2.0)
SOURCE: String (1.0)

Friday, January 12, 2007

Entrepreneurs

One way to make a living in Open Source is to create a proprietory format based on Open standards with proprietory extensions. Here is an example. You modify and build a custom portal from an Open Source portal. Your tool creates JSR-168 or JSR-286 war files (open standard) with proprietory extensions. Give it a .portal file suffix. The majority of the format respects the portlet standard and the extensions make it proprietory. With some modifications from a professional it can become standard therefore interesting to the Free Software Community.

Tuesday, January 02, 2007

I am working on a funded project for government emergency response management in the united states. There is an early open source version of this, http://www.mapimage.com/openaddress.org/. It is derived from MapServer and MapTools software.

I have contributed a MapServer integration project to the Apache Portals project. The source code is here, http://svn.apache.org/repos/asf/portals/bridges/trunk/mapserver. The documentation is here, http://wiki.apache.org/portals/MapServerPortlet.

I studied general geology and computer science leading me to a career as a independent consultant. My products include portals, internet mapping apps, xml utilities, database tools, development and compile platforms derived primarily from Apache projects.

The Java platform is my preferred development environment although I am also a competent database and Linux system administrator. I have been programming in Java for 8 years and have been working with open source software for 5 years.
Squeezing the Dojo Toolkit and AndroMDA into Apache Portals Jetspeed 2

Apache Portals Jetspeed is a component based Enterprise Portal Server implementing the JSR-168 Portlet Standard. The Dojo Toolkit is an Ajax ready rich client interface for creating Web 2.0 pages. AndroMDA is a code generator that make using UML useful. When combined these three tools make data integration fun again. All stacked up in combination with the Apache httpd web server and Apache Tomcat and Apache Harmony to bring database Apache DB Derby cross platform web applications to the browser of your choice. This talk will demonstrating using an integrated Apache web platform with tight single sign on security to web applications running on the Internet.

Tuesday, December 12, 2006

It will be a big day when Microsoft distributes a Linux client. This is what proves Linux is not gaining much of Microsofts turf. For now there is smb://192.168.0.2/e
Cartographic Symbols and Lines



Getting a common street lines to render using MapServer is done using the symbol directive. Define the symbol.

SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END

And define your line layer with two style objects. One for the solid line and one for the outline.

LAYER
NAME Streets
TYPE LINE
STATUS OFF
DATA StreetsRR/CompletedCenterlines1-3

LABELITEM 'Fename'
CLASS
STYLE
SYMBOL 'circle'
COLOR 180 180 180
SIZE 3
END
STYLE
SYMBOL 'circle'
COLOR 255 255 255
SIZE 1
END
LABEL
ANGLE auto
TYPE truetype
FONT luxisr
MINFEATURESIZE 40
MINDISTANCE 150
SIZE 12
COLOR 0 0 0
END
TEMPLATE "templates/StreetsRR/Streets.html"
END

HEADER "templates/StreetsRR/Streets_header.html"
FOOTER "templates/StreetsRR/Streets_footer.html"

END
Linux ODBC

When you get the following command to work you've got Linux ODBC working but getting there is not always easy. I'm using Debian 3.1 other distros may vary.

isql -v myDatasource

The argument myDatasource is the name defined in /etc/odbc.ini

postgres@debian:~$ cat /etc/odbc.ini
[pg]
Description = Rose
Driver = PostgreSQL
Trace = Yes
TraceFile = /tmp/psqlodbc.log
Database = rose
Servername = localhost
UserName = postgres
Password = myPassword
Port = 5432
Protocol = 6.4
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
ConnSettings =

Notice the username is the default postgres account. The Driver and Database are also key values.

The Driver is defined in /etc/odbcinst.ini

postgres@debian:~$ cat /etc/odbcinst.ini
[PostgreSQL]
Description = PostgreSQL ODBC driver
Driver = /usr/lib/odbc/psqlodbc.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 1
CommLog = 1
FileUsage = 1




Tuesday, November 28, 2006

Marvellous discovery. The GPX format. An xml schema for GPS data. I just used it with my GPS. A garmin legend c. To sample this out I used Debian 3.1 and an excellent tool called gpsbabel version 1.3.2. It worked right out of the box.

sudo apt-get install gpsbabel

sudo gpsbabel -t -r -w -i garmin -f usb: -o gpx -F gironde.gpx

The format stores way points with latitude longitude name description current time symbols and elevation.

Tracks are stored as track segments with track points containing the latitude longitude time and elevation.

Sunday, November 26, 2006

Spatial Network Travel