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

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

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.
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/

Sunday, November 19, 2006

Great News! Apache talks to Tomcat through the AJP proxy. Check out mod_proxy_ajp. To enable this great service add the following to your httpd.conf file.

ProxyPass /jetspeed ajp://127.0.0.1:8009/javacontext
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.

Tuesday, November 14, 2006

OpenSSL

sudo openssl genrsa -des3 -out domainname.key 1024
sudo openssl rsa -noout -text -in domainname.key
sudo openssl req -new -key domainname.key -out domainname.csr
sudo openssl req -noout -text -in domainname.csr

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

Friday, November 10, 2006

Using Ajax Dojo Toolkit
  • The first difficulty was finding out what onClick event was being called when I clicked a checkbox. (Turns out to be some event listener addition)
  • Code that got things working:


dojo.event.connect(portletsTable, "updateEditor", updateEditor );
dojo.event.connect(portletsTable, "saveEntrySubmit", saveEntrySubmit );
dojo.event.connect(portletsTable, "clearAndDisableEditor", clearAndDisableEditor );
portletsTable.getNewEntryPrototype = getNewEntryPrototype;
var data = [] ;
##foreach($p in $portletPermissions)
//data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
##end
data.push( { name: "Xin603 1", actions: "192.168.0.1", roles: "EF:E2:D5:6A:4B:44", Id: 1 } );
data.push( { name: "Xin603 2", actions: "192.168.0.2", roles: "55:E1:D2:7A:4B:44", Id: 2 } );
data.push( { name: "Xin603 3", actions: "192.168.0.3", roles: "55:A1:2D:A2:41:34", Id: 3 } );
portletsTable.js_masterdata = data;
portletsTable.js_type = "portlet";

Thursday, November 09, 2006

Debian Unstable
I've taken the leap into debian unstable territory. I needed a new version of gcc. Newer than 3.3.4. Stepping closer to the edge. The contents of my sources.list has changed to:

deb ftp://ftp2.fr.debian.org/debian/ stable main
deb-src ftp://ftp2.fr.debian.org/debian/ stable main
deb http://security.debian.org/ stable/updates main
p

Monday, November 06, 2006

MapServer - ODBC - OGR - Postgresql 7.4.7

I'll have to admit that this is not cutting edge mapping, but it is platform independent using php4, unixodbc, and apache. It works on Linux and works on Windows. The objective here is to get map plotting working. Scalability and security are assured by using a relational database.

OGR

OGR is a vendor independent geospatial data access library included with gdal.

Simplify Data

To illustrate properly map plotting of point data such as addresses we have set up a database table containing longitude and latitude data.

Map Server

Map Server is configured to read from the database and display custom icons for point data.

OGR Configuration





ODBC:postgres/password@pg


MappingPlot



wkbPoint



MapFile Configuration

The following configuration lets the user plot different icons given the value of icon_id. The layer will only display icons from the mapping_plot table where parameters_id is equal to 1. This is achieved using the FILTERITEM and FILTER keywords. Labels are shown from the tables remarks column.

LAYER
NAME "MapPlottingbob"
CONNECTION "conf/MapPlotting.ovf"
CONNECTIONTYPE OGR
STATUS ON
TYPE POINT
DATA mapping_plot
CLASSITEM icon_id
FILTERITEM "parameters_id"
FILTER "1"
LABELITEM "remarks"


CLASS
EXPRESSION "1"
SYMBOL "/home/phil/liveaxis/src/rose-0.3.7/graphics/crime.png"

STYLE
COLOR 0 0 0
END

LABEL
MINFEATURESIZE 40
MINDISTANCE 150
POSITION UR
SIZE MEDIUM
COLOR 0 0 255
END
TEMPLATE "templates/MappingPlot/MappingPlot.html"
END

CLASS
EXPRESSION "2"
SYMBOL "/home/phil/liveaxis/src/openaddress/src/plotting/icons/1.gif"

STYLE
COLOR 0 0 0
END

LABEL
MINFEATURESIZE 40
MINDISTANCE 150
POSITION UR
SIZE MEDIUM
COLOR 0 0 255
END
TEMPLATE "templates/MappingPlot/MappingPlot.html"
END

CLASS
EXPRESSION "3"
SYMBOL "/home/phil/liveaxis/src/openaddress/src/plotting/icons/2.gif"

STYLE
COLOR 0 0 0
END

LABEL
MINFEATURESIZE 40
MINDISTANCE 150
POSITION UR
SIZE MEDIUM
COLOR 0 0 255
END
TEMPLATE "templates/MappingPlot/MappingPlot.html"
END

HEADER "templates/MappingPlot/MappingPlot_header.html"
FOOTER "templates/MappingPlot/MappingPlot_footer.html"

END

Thursday, November 02, 2006

Setting the date on Linux

sudo date --set='+1 hours'

Tuesday, September 19, 2006

I am trademarking right now YouML! The idea is to create a yahoo google interface implemented in j2. Features are building applications from any ML.

Sqeezing Andromda 3 into Jetspeed 2 will help this effort.

What is a MDA?

An engine that enterprets the Universal Modeling Language (UML) and exposes a java datamodel to meta facades and templates.

What are meta facades?

Objects generated from a UML model describing a framework such as struts, ojb, jsf portlet, xml schema with xmlbeans, data backup and restore with ddlutils, etc. The meta facades describe aspects of the framework such as it's capabilities to display complex web interfaces.

This is one of the grey areas of Andromda. The default Cartriges don't generate jsf or struts only. But rather an Andromda developers framework or best practice for using such technologies. Anyway what's interesting is that the framework is yours to choose. But the reality is you have to write or modify Cartriges to achieve your MDA generated framework.

What is an object model?

An object model is a java model view to the framework.

What is an Repository?

The Repository is the underlying UML implementation. Eclipse Modeling Framework and Netbeans UML implementation are two examples of Repositories.

Getting familiar?

So the contents of the repository is the bizness inteligence, or process modeled in UML.

What is all this about?

It's about working fast! No, that's not true!

It's about thinking graphically. Developing in a graphic environment. Building bug free boiler plate code. You code the logic if you want. Configuration is achieved in the meta facades and object models. The user works with UML objects by assigning them stereotypes and tagged values which determine the framework implementation. That's enough for now. Try it www.andromda.org

Friday, September 01, 2006

Profiling, profiling, profiling. When a user connects to the Apache Portals Jetspeed enterprise portal the profiler will decide what he or she gets. The profiler uses rules and criteria in order to find a match based on user, group, role, language, media type, country, language.

The Profiler Valve invokes this process. First the criteria object is build defined by the keys: page, user, group, role, media-type.

There are only two default rule objects used by J2 out of the box. The StandardProfilingRule and the RoleFallbackProfilingRule. Both set up keys for the criteria stored in the database.

The database implements two tables, PROFILING_RULE and RULE_CRITERION. When applied the rules build a ProfileLocator which is used in the content negociation logic of the ProfilerValve. Implemenation to be verified.

The ProfileLocator object is like a super map full of keys and values. The key is the Criterion object. Currently reading implementation...

Administrators can see all the rules available but one has to know the keys, 'page', and 'menu' are the most common and are setup out of the box. Both users 'user' and 'jetspeed' are setup with the 'role-group' rule set to the key 'menu'. Their 'page' rules are different. 'role-fallback' and 'j2' respectfully. Their roles are set to 'user'.

The Profiler in conjunction with the Page Manager converts location keys into file system paths. Example,

path:/search/search-engine.psml:role:user:group:user:mediatype:html:language:fr

Is converted to,

WEB-INF/pages/_role/user/_group/user/_mediatype/html/_language/fr/search/search-engine.psml

A fallback mechanism is used to search for alternatives. The first file found is used to render the page,

WEB-INF/pages/_role/user/_group/user/_mediatype/html/_language/fr/search/search-engine.psmlWEB-INF/pages/_role/user/_group/user/_mediatype/html/search/search-engine.psmlWEB-INF/pages/_role/user/_group/user/search/search-engine.psmlWEB-INF/pages/_role/user/search/search-engine.psmlWEB-INF/pages/search/search-engine.psml

See the Profiler - Page Manager design documentation for a more detailed description.

What is Fallback? People say things like a Jetspeed Profile Rule fallback, meaning the rule will fallback if it does not find an exact match. This means that the rule will loop through a sequence of paths until it finds a file that meets the Criteria. See the above example.

Thursday, August 31, 2006

Things I've got to find.
The Tomcat access log. Found It! See the Tomcat valve documentation. It discusses the org.apache.catalina.valves.AccessLogValve

Friday, August 25, 2006


My tree would make a great layout decorator for Apache Portals Jetspeed.

Friday, August 18, 2006

I think that a very interesting feature of Jetspeed-2 is it's LDAP support. Support for the Apache Directory Server is provided in the distribution. And discusion on supporting other servers is starting on JIRA-491

Thursday, August 17, 2006

Installing OTRS 2.0.4 trouble ticket system on Fedore Core 4!

1. Download the RPM

[nagios@nagios noc]$ wget ftp://ftp.otrs.org/pub/otrs/RPMS/redhat/8.0/otrs-2.0.4-01.i386.rpm

2. Install RPM

[nagios@nagios noc]$ sudo rpm -ihv otrs-2.0.4-01.i386.rpm
error: Failed dependencies:
fetchmail is needed by otrs-2.0.4-01.i386

Resolve fetchmail dependency

[nagios@nagios noc]$ sudo yum install fetchmail

3. Start services

[nagios@nagios noc]$ sudo /sbin/service httpd start

I had problems with Fedora Core 4 and OTRS. This post saved me. It says to change all references to Apache to Apache2 in /etc/httpd/conf.d/otrs.conf

[nagios@nagios noc]$ sudo /sbin/service mysqld start

4. Set the password for the MySQL server

[nagios@nagios usr]$ sudo /usr/bin/mysqladmin -u root password 'new-password'
[nagios@nagios usr]$ sudo /usr/bin/mysqladmin -p -u root -h mydomain.tld password 'new-password'
Enter password:

5. Install the OTRS database

http://mydomain.tld/otrs/installer.pl

A warning message about permission write access to Config.pm was resolved by disabling SELinux with this command,

[nagios@nagios usr]$ sudo /usr/sbin/setenforce 0

6. Start OTRS service

[nagios@nagios noc]$ sudo /sbin/service otrs start

Sunday, August 13, 2006

I am doing some simple :) xml editing so I thought I would explore eclipse 1.2 xml support. So here we go with the Compound XML Document Toolkit http://www.alphaworks.ibm.com/tech/cxde

I'm using windows at the moment so I'm getting the all in one starter kit from the Web Tools project http://www.eclipse.org/webtools/ which depends on GEF and EMF.

Big download...

The installation of the Compound XML Document Toolkit was not successful but after an hour or two of using Web Tools xml editor I am satisfied to say that it provides good xml, xsl, dtd, and xml schema support. On the other hand my first wish would be to have a means of displaying the xpath a specific target location to any other place in the document. Visually determining an xpath such as the following is rather cumbersome,

XMI/XMI.content/UML:Model/UML:Namespace.ownedElement/UML:Package/UML:Namespace.ownedElement/UML:UseCase/UML:Namespace.ownedElement/UML:SignalEvent/UML:Event.parameter/UML:Parameter/UML:ModelElement.taggedValue/UML:TaggedValue/UML:TaggedValue.referenceValue/UML:ModelElement/XMI.extension/referentPath[@xmi.value='org.andromda.profile::presentation::WebFieldType::selecttextinput']

Thanks for reading...Keep coming back for more on UML editing.

Tuesday, June 27, 2006

This blog will present you with a common method for maintaining branches of an open source project. A concrete example would be when you take and modify an opensource project. Branches are maintained with diff files. The subversion command for diff is 'svn diff myDirectory'. Suppose you want to use an open source project to create your own website. Just keep a copy of the svn diff and send that to any machine that will be used to deploy the website.

Tuesday, June 13, 2006

For the second time I had a problem with javac on linux. You can not use the ~ char in the -classpath flag.
You must make a choice when developing a portlet. The Simplest being the javax.portlet.GenericPortlet. Others include the FacesPortlet, ServletPortlet, StrutsPortlet, VelocityPortlet, PerlPortlet, PHPApplicationPortlet, DotNetPortlet, and the MapServerPortlet. Documented on the Apache Portals Bridges project website.

Tuesday, June 06, 2006

Set up jetspeed server.

User record synchrontion with back end service.

No integrated marketplace.

Special urls for each group.

Messaging system. Contact everyone by building manager. Contact the lobby using this system.

Virginia, NY, CT, California.

What's new (announcements).

Marketplace,

June, test machine.

Sunday, June 04, 2006

Just installed FreeBSD for the first time. /usr/bin/sysinstall is the command that newbies like me need to remember.

* Be aware that a security key is generated using a full screen of random text.

* Installed Gnome but xdm does not us it.

Friday, May 26, 2006

I wrote the Jetspeed 2.0 release announcement. Here are some additional features of Jetspeed.

Standard and secure platform for creating custom web portals.

Monday, May 22, 2006

Jetspeed Security and Content Management

The objective of this text is to outline how to provide portal content and functionality to an outside server. There are two issues. One is the user must be authenticated to use a particular content. The other is defining the method to access the pages without the menu and logos. A third issue comes to mind if the provided content is inline rather than in an iframe (the server does all of the content negociation and the clients browser does not even know that it is getting content from a third party) which is all urls for images, links, forms, and resources must be standardized so that the server can know when it is to act as a proxy to third party portal content).

Authentication

One way to do authorization is by using a post request over https where password credentials can be verified. Another way is to sacrafice security for facility by allowing get requests to be made over http. This is not desirable but may facilitate testing. Production servers must make the post over a secure connection.

Content without menus and logos

One assumption that is made is the menus and logos will be invisible and only the content of the portal will be present. For this to work we need to be able to use two different themes depending on the caller.

A page accessed using the MyPage.psml will be rendered with the logo and menus. If the same page is accessed using MyPage.psml?org.apache.portals.jetspeed.theme=simple the logos and menus would be hidden. This parameter can also be passed one time during authetication to set the theme used for the entire session.

URLs

If the server does the content negociation it will act as a proxy to the Jetspeed portal requesting content and providing it inline to the end user. All URLs with a given prefix would have to be redirected to another server for content. A portlet can be written for Jetspeed to act as a proxy server to aquire third party content.

Code

This url will authenticate the user and override all page themes so that the portal content is presented without menus and logos.


http://localhost:8080/jetspeed/login/proxy?org.apache.jetspeed.login.username=user&org.apache.jetspeed.login.password=user&org.apache.jetspeed.theme.override=simple


It depends on a patch submitted by me a few days ago. See the Jira issue
The preferences implementation in Apache Jetspeed is currently based on a database persistence model. I'm stepping through the Jetspeed startup to see where this is going. It uses Apache DB OJB to access the database. Preferences are the first objects to be initialized with database access.

Tuesday, April 11, 2006

Jetspeed preferences or the Portal api preferences are getting on my nerves. I am specifying preferences in the psml file. When I debug I get calls to two separate FragmentImpl.getPreferences methods.

The first is a call to the FragmentImpl in package,
org.apache.jetspeed.om.page.psml
Which is related to the portlet itself.

The second is a call to the FragmentImpl in package,
org.apache.jetspeed.om.page.impl
Which is related to layouts.

The fist call populates a o.a.j.om.preference.impl.FragmentPortletPreferenceSet from o.a.j.om.page.ContentFragmentImpl. Then pluto eats the preference and I never see it in my portlet.
I just participated in Jim's web seminar on LAMP. I picked up a few tips about linux.

/etc/security/limit.conf

fs.file.limit
max.user.processes
net.ipv4.ip_local_port_range

Apache
KeepAlives
Min/Max SpareServerThreads
MaxRequestsPerChild

Contact info:
jimj@covalent.net
seminars@covalent.net

Monday, April 03, 2006

Caused by: java.lang.IllegalArgumentException: Illegal pattern character 'x'

Hmm, this is the second time I got this exception using Andromda. It is caused by an invalid character in my @andromda.presentation.view.field.format tagged value. Dates can not use the 'maxlength 10' value 'strict dd/MM/yyyy' is better validation rule.

Sunday, January 29, 2006

Geronimo is a truly modular application server. It can be build to run any particular war or ear with only the components that it needs. If your application is not running jms then build geronimo without activemq. If it is not using ejb then build it without openejb. This allows for a leaner faster application server, customized to run only the components that are needed.

Wednesday, January 25, 2006

Geronimo blogging is back, Andromda, MapServer, and Jetspeed news will follow. This is a list of some important modules built during the 'maven new' compile.

Geronimo :: Kernel
Geronimo :: Common
Geronimo :: Util
Geronimo :: System
Geronimo :: Deployment
Geronimo :: Core
Geronimo :: Management API

The first interesting thing to look at apart from the architecture which includes Kernel and Core, is the Management API. This programming interface allows you to control all GBeans installed in the system.

Geronimo :: J2EE
Geronimo :: J2EE Schema
Geronimo :: Service :: Builder
Geronimo :: Maven Dependency Plugin
Geronimo :: Security

Then checkout Security. All the standards are here JAAS and JACC.

Geronimo :: Web Services
Geronimo :: Axis
Geronimo :: Mail
Geronimo :: Deploy :: Common Config
Geronimo :: Test :: DDBeans
Geronimo :: Naming
Geronimo :: Security :: Builder
Geronimo :: J2EE
Geronimo :: Naming :: Builder
Geronimo :: Web :: Builder
Geronimo :: Transaction
Geronimo :: Connector
Geronimo :: Tomcat
Geronimo :: Connector :: Builder
Geronimo :: Axis :: Builder
Geronimo :: Tomcat :: Builder
Geronimo :: Derby
Geronimo :: Jetty
Geronimo :: Timer
Geronimo :: Client
Geronimo :: Client Builder
Geronimo :: Scripts
Geronimo :: Session
Geronimo :: Deploy :: JSR-88
Geronimo :: Jetty :: Builder
Geronimo :: Activation
Geronimo :: Configuration Converter
Geronimo :: Console Web
Geronimo :: JMX Remoting
Geronimo :: Installer Support
Geronimo :: JavaMail Transport
Geronimo :: Deploy :: CLI Tool
Geronimo :: Directory
Geronimo :: Installer Processing
Geronimo :: Deploy :: Hot Deployer
Geronimo :: Maven Deployment Plugin
Geronimo :: Maven Assembly Plugin
Geronimo :: IZPack Installer Build Plugin
Geronimo :: Maven Packaging Plugin

Blog Archive