The bug is a critical part of our lives. Without her we would be stranded on a Maine-land peninsula with the seals.
Everything Java Apache Geospatial Open Source. Hello Shinning Stars!!! Vincent Massol, Raphael Luta, Santiago Gala, Carsten Z.
Saturday, May 12, 2007
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)
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.
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.
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.
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
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

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
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.
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
Thursday, November 23, 2006
Emulating Windows XP on Linux using QEMU
Quoting the quickstart guide.
Create an virtual Harddrive
qemu-img create -f qcow windowsxp.img 3G
Install Windows XP
qemu -cdrom /dev/cdrom -hda windowsxp.img -m 256 -boot d
This command means to boot from the d drive using 256 megabytes of RAM. The -cdrom option indicates where to find the device.
Networking is configured by default and Windows XP should configure itself with DHCP.
Quoting the quickstart guide.
Create an virtual Harddrive
qemu-img create -f qcow windowsxp.img 3G
Install Windows XP
qemu -cdrom /dev/cdrom -hda windowsxp.img -m 256 -boot d
This command means to boot from the d drive using 256 megabytes of RAM. The -cdrom option indicates where to find the device.
Networking is configured by default and Windows XP should configure itself with DHCP.
OpenSuSE 10.1 Network Install on AMD 64 Athalon
Requirements
cdrom read write
network connection
Prepare the CD
Download, write, and boot from the miniiso.
Specify Resource
At the boot menu type,
install=http://ftp.opensuse.org/pub/opensuse/distribution/SL-10.1/
Requirements
cdrom read write
network connection
Prepare the CD
Download, write, and boot from the miniiso.
Specify Resource
At the boot menu type,
install=http://ftp.opensuse.org/pub/opensuse/distribution/SL-10.1/
Sunday, November 19, 2006
Geospatial data units, commonly refered to as features, can be related to one another in one of three fundamental ways. Mutually exclusive meaning that there is no space common to both features, partially inclusive meaning that each feature overlaps the other but not entirely. They occupy space that is both common and unique to one another. And all inclusive meaning one feature si defined entirely within the bounds of the other. Points, lines and polygons can relate to polygons in this way. Yet lines can only intersect one another. Points can be part of a line and can be included in a polygon or be part of the polygons bound definition.
Thursday, November 16, 2006
I've been doing alot of security lately and I need to backup some derby databases from one machine to another. The backup strategy is simple create an compressed archive and copy it using a secure connection to another machine. I'm documenting the process here. I want to backup a directory found at /path/parent/data. And I want the archive to maintain the directory data so that when it is expanded it writes one directory data and all the contents below it.
cd /path/parent
tar czf /tmp/data-`date +%j`.tar.gz data
The archive name is created with a %j indicating the day of the year. Therefore maintaining a year of backups. The next year will start to overwrite previous backups.
Then we want to copy the data to a remote machine. A secure encrypted copy can be sent to the remote machine. But in order to incorporate this in a cron job the remote machine must accept a password-less connection. These are the steps to generate the key. Run ssh-keygen without providing a passphrase.
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub remoteuser@remotemachine:.ssh/authorized_keys2
Now remote connections can be made without providing a password. Meaning the remote machine trusts the local machine.
cd /path/parent
tar czf /tmp/data-`date +%j`.tar.gz data
The archive name is created with a %j indicating the day of the year. Therefore maintaining a year of backups. The next year will start to overwrite previous backups.
Then we want to copy the data to a remote machine. A secure encrypted copy can be sent to the remote machine. But in order to incorporate this in a cron job the remote machine must accept a password-less connection. These are the steps to generate the key. Run ssh-keygen without providing a passphrase.
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub remoteuser@remotemachine:.ssh/authorized_keys2
Now remote connections can be made without providing a password. Meaning the remote machine trusts the local machine.
Tuesday, November 14, 2006
Monday, November 13, 2006
Setting up an Apache2 SSL and SuSE 10 Firewall
Setting the SuSEfirewall2 to accept https connections requires a modification to /etc/sysconfig/SuSEfirewall2.
FW_SERVICES_EXT_TCP="ssh www 443 8888"
This definition allows the Internet to connect via ssh http https and a backdoor tomcat server. Apply the new rules with,
sudo /sbin/SuSEfirewall2 start
Configuring the Default SuSE Apache 2.2 SSL
Useful guides can be found in /usr/share/doc/packages/apache2. Check out README, README.QUICKSTART, README.QUICKSTART.SSL and README.SUSE.
Define a NameVirtualHost in /etc/apache2/listen.conf
NameVirtualHost www.example.com:443
Enable the ssl configuration by copying /etc/apache2/vhosts.d/vhosts-ssl.template to vhosts-ssl.conf (only files with the extension conf will be read). Change the line with _default_ as indicated below.
Create a Test Certificate
cd /usr/share/doc/packages/apache2
sudo ./certificate.sh
Restart Apache
sudo /etc/init.d/apache2 restart
Setting the SuSEfirewall2 to accept https connections requires a modification to /etc/sysconfig/SuSEfirewall2.
FW_SERVICES_EXT_TCP="ssh www 443 8888"
This definition allows the Internet to connect via ssh http https and a backdoor tomcat server. Apply the new rules with,
sudo /sbin/SuSEfirewall2 start
Configuring the Default SuSE Apache 2.2 SSL
Useful guides can be found in /usr/share/doc/packages/apache2. Check out README, README.QUICKSTART, README.QUICKSTART.SSL and README.SUSE.
Define a NameVirtualHost in /etc/apache2/listen.conf
NameVirtualHost www.example.com:443
Enable the ssl configuration by copying /etc/apache2/vhosts.d/vhosts-ssl.template to vhosts-ssl.conf (only files with the extension conf will be read). Change the line with _default_ as indicated below.
Create a Test Certificate
cd /usr/share/doc/packages/apache2
sudo ./certificate.sh
Restart Apache
sudo /etc/init.d/apache2 restart
Subscribe to:
Posts (Atom)




