Re: GIS Tools/modeling

2007-12-24 Thread Al Byers
Chris,

I did as you said - except I loaded GeoServer, not MapServer, as a webapp -
GeoServer is Java-based and more modern. But did you see that I also
created the WfsEventHandler and WfsViewHandler? I think that GeoServer
should be used to paint backgrounds - streets, terrain, etc. and have OFBiz
handle the points of interest thru the WftEvent/ViewHandler. I think this
will be the case with most OFBiz apps - there will be entities that have
physical locations and most of what you will want to do is plot them over
the GeoServer base layers. This is consistent with how GIS is done these
days - mashups in which data is drawn from multiple servers.

Sometimes I could imagine that the queries that you want to do on the
ofbiz-managed points of interest could get more involved than the typical
boundary rectangle search and that would be the place that the database
specific objects could come in handy. Actually that may be mostly related to
completing the WFS query operations. Right now, it only does a simple
property query - it does not even find the points within a boundary
rectangle - that would be the next task to complete.

The main place in which database specific object routines would be handy
would be when you want to store something more than simple point locations -
perhaps paths to get from one place to another, or property boundaries. You
may want to get all properties that impinge on an area.

Everything could be done via the WFS queries on the GeoServer server, but I
think things could be much difficult in some instances. There may be
occasion when you want to display points of interest that are very much
dependent on ofbiz entities - perhaps many more than you want GeoServer to
have to know about. in those cases it would be much simpler to not require
that a developer know much about Geoserver and query languages like wfs and
ofc. In fact, it would not be necessary to use the WfsEventHandler to find
points of interest; one could just do an OFBiz native search and return the
points thru the WfsViewHandler so that they could be plotted via a client
tool like Community MapBuilder.

Don't forget the availability of GeoRSS for making OFBiz entities available
to utilities like Google Maps. That is another area in which it would be
important for OFBiz to be able to handle spatial queries.

So I think the bottom line is that it will be very beneficial for OFBiz to
do some, but not the full range of GIS functions - with those functions
being specifed by WFS and GeoRSS.

I think the answer to the two questions below is that if it were simply
single points, then there would be no need to build out the entity engine
database specific objects, but if there is ever a need for polyline objects,
such as property borders, then those objects would be required. Once that is
done, you could look into tying in the GeoTools toolkit - using GeoServer as
a model. But that would probably be going to far - no need for another GIS
server. I think the dividing line is the handling of simple polyline
objects.

-Al

On 12/23/07, Chris Howe [EMAIL PROTECTED] wrote:

 I've dug a bit deeper into this (slowly but surely) and have a few more
 questions.
 1) Is there any interest in having the entity engine handle database
 specific objects?
 2) Is there any benefit in having the entity engine handle database
 specific objects?

 I'm seeing the easiest way to handle GIS in the same manner that Al Byers
 did.  That is, have ofbiz load MapServer as a webapp and let that be the
 only communication with the geo-spatial database.  Any thoughts?




Re: GIS Tools/modeling

2007-12-24 Thread Chris Howe
Thanks Al,
I had skipped over three important pieces of information for my current project.
1) Google Maps can handle KML and GML directly
2) Postgis has a function St_AsKML and ST_AsGml
3) The SQLProcessor in OFbiz lets me pass queries that use functions (like 
ST_AsKML) through it

Mixed with the widgets, I think this may end up being sufficient for my current 
needs.  And I don't have to worry about manipulating a GPL'd project :-)

On a side note,
If I could get the view-entity to handled the complex-alias function of 
ST_AsKML(the_geom), I would be completely satisfied.  But it wants to evaluate 
the_geom as an unsupported type first...

- Original Message 
From: Al Byers [EMAIL PROTECTED]
To: dev@ofbiz.apache.org
Sent: Monday, December 24, 2007 9:48:50 AM
Subject: Re: GIS Tools/modeling


Chris,

I did as you said - except I loaded GeoServer, not MapServer, as a
 webapp -
GeoServer is Java-based and more modern. But did you see that I also
created the WfsEventHandler and WfsViewHandler? I think that GeoServer
should be used to paint backgrounds - streets, terrain, etc. and have
 OFBiz
handle the points of interest thru the WftEvent/ViewHandler. I think
 this
will be the case with most OFBiz apps - there will be entities that
 have
physical locations and most of what you will want to do is plot them
 over
the GeoServer base layers. This is consistent with how GIS is done
 these
days - mashups in which data is drawn from multiple servers.

Sometimes I could imagine that the queries that you want to do on the
ofbiz-managed points of interest could get more involved than the
 typical
boundary rectangle search and that would be the place that the database
specific objects could come in handy. Actually that may be mostly
 related to
completing the WFS query operations. Right now, it only does a simple
property query - it does not even find the points within a boundary
rectangle - that would be the next task to complete.

The main place in which database specific object routines would be
 handy
would be when you want to store something more than simple point
 locations -
perhaps paths to get from one place to another, or property boundaries.
 You
may want to get all properties that impinge on an area.

Everything could be done via the WFS queries on the GeoServer server,
 but I
think things could be much difficult in some instances. There may be
occasion when you want to display points of interest that are very much
dependent on ofbiz entities - perhaps many more than you want GeoServer
 to
have to know about. in those cases it would be much simpler to not
 require
that a developer know much about Geoserver and query languages like wfs
 and
ofc. In fact, it would not be necessary to use the WfsEventHandler to
 find
points of interest; one could just do an OFBiz native search and return
 the
points thru the WfsViewHandler so that they could be plotted via a
 client
tool like Community MapBuilder.

Don't forget the availability of GeoRSS for making OFBiz entities
 available
to utilities like Google Maps. That is another area in which it would
 be
important for OFBiz to be able to handle spatial queries.

So I think the bottom line is that it will be very beneficial for OFBiz
 to
do some, but not the full range of GIS functions - with those functions
being specifed by WFS and GeoRSS.

I think the answer to the two questions below is that if it were simply
single points, then there would be no need to build out the entity
 engine
database specific objects, but if there is ever a need for polyline
 objects,
such as property borders, then those objects would be required. Once
 that is
done, you could look into tying in the GeoTools toolkit - using
 GeoServer as
a model. But that would probably be going to far - no need for another
 GIS
server. I think the dividing line is the handling of simple polyline
objects.

-Al

On 12/23/07, Chris Howe [EMAIL PROTECTED] wrote:

 I've dug a bit deeper into this (slowly but surely) and have a few
 more
 questions.
 1) Is there any interest in having the entity engine handle database
 specific objects?
 2) Is there any benefit in having the entity engine handle database
 specific objects?

 I'm seeing the easiest way to handle GIS in the same manner that Al
 Byers
 did.  That is, have ofbiz load MapServer as a webapp and let that be
 the
 only communication with the geo-spatial database.  Any thoughts?







Re: GIS Tools/modeling

2007-12-23 Thread Chris Howe
I've dug a bit deeper into this (slowly but surely) and have a few more 
questions. 
1) Is there any interest in having the entity engine handle database specific 
objects?
2) Is there any benefit in having the entity engine handle database specific 
objects?

I'm seeing the easiest way to handle GIS in the same manner that Al Byers did.  
That is, have ofbiz load MapServer as a webapp and let that be the only 
communication with the geo-spatial database.  Any thoughts?



Re: GIS Tools/modeling

2007-12-16 Thread Chris Howe
There is a lot of crazy stuff going on to make/utilize a spatial database.  
Before I go digging around for an answer to this, maybe someone can critique 
this approach and how it works against the OFBiz entity engine.

In order to access anything useful from a geospatial database (in my case 
PostgreSQL using PostGis) you have to be able to call functions.  So, first 
question:  Are there tools that exist already in OFBiz to call functions that 
exist in the database or do you _have to use the SQLProcessor to run a query 
with a function?

Second question: The data is stored as a geometry data type in the database.  
Most everything that is going to be consumed by OFBiz (Google Maps, etc) 
AFAICT, wants coordinate pairs and not geometry object.   Is it better 
performance/development wise to create those functions in the database or to 
process the data in OFBiz?

For a little background, this is the kind of query necessary to get a 
coordinate pair from a polygon geometry:

select gid, (
((select st_x(astext(transform(st_pointn(st_exteriorring(ST_GeometryN(the_geom, 
1)),1),4030))) from precinct where gid=1),
(select st_y(astext(transform(st_pointn(st_exteriorring(ST_GeometryN(the_geom, 
1)),1),4030))) from precinct where gid=1)),
((select st_x(astext(transform(st_pointn(st_exteriorring(ST_GeometryN(the_geom, 
1)),2),4030))) from precinct where gid=1),
(select st_y(astext(transform(st_pointn(st_exteriorring(ST_GeometryN(the_geom, 
1)),2),4030))) from precinct where gid=1)),
((select st_x(astext(transform(st_pointn(st_exteriorring(ST_GeometryN(the_geom, 
1)),3),4030))) from precinct where gid=1),
(select st_y(astext(transform(st_pointn(st_exteriorring(ST_GeometryN(the_geom, 
1)),3),4030))) from precinct where gid=1))
...n-number of points in polygon
)
from precinct where gid =1;

- Original Message 
From: Al Byers [EMAIL PROTECTED]
To: dev@ofbiz.apache.org
Sent: Friday, December 7, 2007 12:47:37 AM
Subject: Re: GIS Tools/modeling


Chris,

Sorry, I did not get around to implementing os geocoders. Here are some
links I came across, however:



http://www.ontok.com/geocode/compare
http://www.ontok.com/api


http://geocoder.us/

One possible alternative is to find the code for a geocoder and use
 some of
the free data that is available for it to operate on. I did not look
 into
that route, but it seems there should be plenty of examples out there
 and
tons of TIGER  data.

-Al





Re: GIS Tools/modeling

2007-12-06 Thread Chris Howe
Al, others

I've been studying this a bit further and I'm running into a couple of 
limitations and I'm not sure if they're avoidable without purchasing 
subscriptions.  When geocoding the only free services I'm finding are 
webservices that don't allow batch processing so each request/response cycle 
takes about 2 seconds.  Have you come across anything that can batch the 
requests and response to retrieve the coordinates of the address?  And even 
better, one that doesn't limit the number of addresses.  I would simply do an 
overlay, but I'm needing to run calculations to test whether the coordinate 
pair is inside a polygon.

- Original Message 
From: Al Byers [EMAIL PROTECTED]
To: dev@ofbiz.apache.org
Sent: Monday, November 26, 2007 2:22:17 PM
Subject: Re: GIS Tools/modeling

Here is an interesting blog talking about some of the issues:
http://radar.oreilly.com/archives/2006/05/where_20_standards_1.html
This was written in 2006 and it could be that GeoRSS has come on
 stronger
since then.

You may well want to implement your app using GeoRSS. I forgot that I
 added
the RomeEventHandler. I see that JIRA issue OFBIZ-721 deals with RSS
 and my
issue is https://issues.apache.org/jira/browse/OFBIZ-1208. Maybe we
 should
use 1208 to capture discussion.

My controller.xml file has these:

!--handler name=wfs type=view class=
org.ofbiz.webapp.view.WfsViewHandler/--
handler name=rome type=request class=
org.ofbiz.webapp.event.RomeEventHandler/
...
request-map uri=ViewCustomRssFeed
security https=false auth=false/
event type=rome invoke=generateCustomRssFeed/
response name=success type=none/
response name=error type=view value=error/
/request-map

Here is the code for generateCustomRssFeed:


   public static Map generateCustomRssFeed(DispatchContext dctx,
 Map
context) {
   Debug.logInfo(generateCustomCustomRssFeed(0) context: +
context, module);
   GenericValue userLogin = (GenericValue)
 context.get(userLogin);
   String entryLink = (String) context.get(entryLink);
   String feedType = (String) context.get(feedType);
   Locale locale = (Locale) context.get(locale);

   // create the main link
   String mainLink = (String) context.get(mainLink);

   LocalDispatcher dispatcher = dctx.getDispatcher();
   GenericDelegator delegator = dctx.getDelegator();

   // get the main blog content
   GenericValue content = null;
 // create the feed
   SyndFeed feed = new SyndFeedImpl();
   feed.setFeedType(feedType);
   feed.setLink(mainLink);

   feed.setTitle(Custom RSS Feed);
   feed.setDescription(Custom RSS Feed);
   Debug.logInfo(generateCustomRssFeed(1) feed: + feed,
 module);
   feed.setEntries(generateEntryList(dispatcher, delegator,
entryLink, locale, userLogin));

   Map resp = ServiceUtil.returnSuccess();
   resp.put(wireFeed, feed.createWireFeed());
   return resp;
   }

   public static List generateEntryList(LocalDispatcher dispatcher,
GenericDelegator delegator, String entryLink, Locale locale,
 GenericValue
userLogin) {
   List entries = FastList.newInstance();
   List customList = null;
   Map nullMap = null;
   try {
   customList = delegator.findByAnd(CustomEntity,
 nullMap);
   } catch (GenericEntityException e) {
   Debug.logError(e, module);
   }

   if (UtilValidate.isEmpty(customList)) {
   return entries;
   }


   Iterator i = customList.iterator();
   while (i.hasNext()) {
   GenericValue v = (GenericValue) i.next();
   Debug.logInfo(generateEntryList(1) v: + v, module);
   String sub = v.getString(customName);
   if (sub != null) {
   String thisLink = entryLink + ?customId= +
v.getString(customId);
   SyndContent desc = new SyndContentImpl();
   desc.setType(text/plain);
   desc.setValue(sub);

   SyndEntry entry = new SyndEntryImpl();
   entry.setTitle(v.getString(customName));
   entry.setPublishedDate(v.getTimestamp
(createdStamp));
   entry.setDescription(desc);
   entry.setLink(thisLink);

//entry.setAuthor((v.getString(createdByUserLogin)));

   GeoRSSModule geoRSSModule = new
 W3CGeoModuleImpl();
   Double lon = v.getDouble(longitude);
   Double lat = v.getDouble(latitude);
   //GeoRSSModule geoRSSModule = new
 SimpleModuleImpl();
   if (lon != null  lat != null) {
   Position pos = new Position(
 lat.doubleValue(),
lon.doubleValue

Re: GIS Tools/modeling

2007-12-06 Thread BJ Freeman
since there is only one set for an address, once in ofbiz you don't have
to ask for it again.


Chris Howe sent the following on 12/6/2007 8:53 PM:
 Al, others
 
 I've been studying this a bit further and I'm running into a couple of 
 limitations and I'm not sure if they're avoidable without purchasing 
 subscriptions.  When geocoding the only free services I'm finding are 
 webservices that don't allow batch processing so each request/response cycle 
 takes about 2 seconds.  Have you come across anything that can batch the 
 requests and response to retrieve the coordinates of the address?  And even 
 better, one that doesn't limit the number of addresses.  I would simply do an 
 overlay, but I'm needing to run calculations to test whether the coordinate 
 pair is inside a polygon.
 
 - Original Message 
 From: Al Byers [EMAIL PROTECTED]
 To: dev@ofbiz.apache.org
 Sent: Monday, November 26, 2007 2:22:17 PM
 Subject: Re: GIS Tools/modeling
 
 Here is an interesting blog talking about some of the issues:
 http://radar.oreilly.com/archives/2006/05/where_20_standards_1.html
 This was written in 2006 and it could be that GeoRSS has come on
  stronger
 since then.
 
 You may well want to implement your app using GeoRSS. I forgot that I
  added
 the RomeEventHandler. I see that JIRA issue OFBIZ-721 deals with RSS
  and my
 issue is https://issues.apache.org/jira/browse/OFBIZ-1208. Maybe we
  should
 use 1208 to capture discussion.
 
 My controller.xml file has these:
 
 !--handler name=wfs type=view class=
 org.ofbiz.webapp.view.WfsViewHandler/--
 handler name=rome type=request class=
 org.ofbiz.webapp.event.RomeEventHandler/
 ...
 request-map uri=ViewCustomRssFeed
 security https=false auth=false/
 event type=rome invoke=generateCustomRssFeed/
 response name=success type=none/
 response name=error type=view value=error/
 /request-map
 
 Here is the code for generateCustomRssFeed:
 
 
public static Map generateCustomRssFeed(DispatchContext dctx,
  Map
 context) {
Debug.logInfo(generateCustomCustomRssFeed(0) context: +
 context, module);
GenericValue userLogin = (GenericValue)
  context.get(userLogin);
String entryLink = (String) context.get(entryLink);
String feedType = (String) context.get(feedType);
Locale locale = (Locale) context.get(locale);
 
// create the main link
String mainLink = (String) context.get(mainLink);
 
LocalDispatcher dispatcher = dctx.getDispatcher();
GenericDelegator delegator = dctx.getDelegator();
 
// get the main blog content
GenericValue content = null;
  // create the feed
SyndFeed feed = new SyndFeedImpl();
feed.setFeedType(feedType);
feed.setLink(mainLink);
 
feed.setTitle(Custom RSS Feed);
feed.setDescription(Custom RSS Feed);
Debug.logInfo(generateCustomRssFeed(1) feed: + feed,
  module);
feed.setEntries(generateEntryList(dispatcher, delegator,
 entryLink, locale, userLogin));
 
Map resp = ServiceUtil.returnSuccess();
resp.put(wireFeed, feed.createWireFeed());
return resp;
}
 
public static List generateEntryList(LocalDispatcher dispatcher,
 GenericDelegator delegator, String entryLink, Locale locale,
  GenericValue
 userLogin) {
List entries = FastList.newInstance();
List customList = null;
Map nullMap = null;
try {
customList = delegator.findByAnd(CustomEntity,
  nullMap);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
 
if (UtilValidate.isEmpty(customList)) {
return entries;
}
 
 
Iterator i = customList.iterator();
while (i.hasNext()) {
GenericValue v = (GenericValue) i.next();
Debug.logInfo(generateEntryList(1) v: + v, module);
String sub = v.getString(customName);
if (sub != null) {
String thisLink = entryLink + ?customId= +
 v.getString(customId);
SyndContent desc = new SyndContentImpl();
desc.setType(text/plain);
desc.setValue(sub);
 
SyndEntry entry = new SyndEntryImpl();
entry.setTitle(v.getString(customName));
entry.setPublishedDate(v.getTimestamp
 (createdStamp));
entry.setDescription(desc);
entry.setLink(thisLink);
 
 //entry.setAuthor((v.getString(createdByUserLogin)));
 
GeoRSSModule geoRSSModule = new
  W3CGeoModuleImpl();
Double lon = v.getDouble(longitude);
Double lat

Re: GIS Tools/modeling

2007-12-06 Thread Al Byers
Chris,

Sorry, I did not get around to implementing os geocoders. Here are some
links I came across, however:



http://www.ontok.com/geocode/compare
http://www.ontok.com/api


http://geocoder.us/

One possible alternative is to find the code for a geocoder and use some of
the free data that is available for it to operate on. I did not look into
that route, but it seems there should be plenty of examples out there and
tons of TIGER  data.

-Al


Re: GIS Tools/modeling

2007-11-26 Thread Al Byers
Hey Chris,

Yes, I did some GIS work a few months ago. What I did was add a WFS
interface to OFBiz. It is WfsEventHandler class in webapp.event. I did a lot
of work with GeoServer (http://docs.codehaus.org/display/GEOS/Home)  and
MapBuilder  (http://docs.codehaus.org/display/MAP/Home) for the client side.
I used MySQL for a geo spatial DB. I think GeoServer is definitely the way
to go for the server since it is Java based and I had no trouble including
it in my ofbiz tomcat setup. There is an effort to consolidate many of the
various client packages (such as OpenLayers) and MapBuilder seems to be at
the forefront of that effort (it uses OpenLayers to render, but adds an XML
syntax for implementing client frontends.

It is a very exciting time for the GIS community as they are working
together to create products and mashups that are the same sort of
Goliath-killers in the GIS world that OFBiz is becoming in the ERP world.

I also did a GeoRSS interface so that I could add markers to Google Maps,
but I did not see how to add that to the ofbiz base code. I would be willing
to share that code if we can see where to add it. See
http://docs.codehaus.org/display/GEOSDOC/GeoRSS.

I think the WFS interface is the critical part, as it lets you use other
servers like GeoServer to server up the base GIS layers, but lets you use
OFBiz to store and server the points of interest. I only modeled points
with my WfsEventHandler class. It needs to be extended to do a rectangular
find. One of the key things that I did was implement the ogc:filter
using FreeMarker templates. That is the part that needs to be extended to
implement the rectangular find.

If you are not familiar with the WFS, WMS and WCS standards, you need to be.
They are what make all the synergy possible.

It has been a few months since I have had a chance to work on it (which
might as well be a few years at my age) so you might want to google gis
and ofbiz to see what else I had to say about it. I would be glad to
discuss and work on something more substantial for ofbiz, but I am not
actively working on GIS at the moment, so my time will be limited.

-Al

On 11/26/07, Chris Howe [EMAIL PROTECTED] wrote:

 I just completed a rather remedial GIS implementation (very poorly
 designed, but works for it's purpose).  Anyone have any
 interest/experience/intelligent thought with this?





Re: GIS Tools/modeling

2007-11-26 Thread Chris Howe
Very interesting. My implementation is extremely crude in comparison.  I was 
only outputting KML and KMZ for Google Earth. It seems I have quite a bit of 
homework to do before being able to add very much to the discussion.  

- Original Message 
From: Al Byers [EMAIL PROTECTED]
To: dev@ofbiz.apache.org
Sent: Monday, November 26, 2007 10:46:31 AM
Subject: Re: GIS Tools/modeling


Hey Chris,

Yes, I did some GIS work a few months ago. What I did was add a WFS
interface to OFBiz. It is WfsEventHandler class in webapp.event. I did
 a lot
of work with GeoServer (http://docs.codehaus.org/display/GEOS/Home)
  and
MapBuilder  (http://docs.codehaus.org/display/MAInterstinP/Home) for the client
 side.
I used MySQL for a geo spatial DB. I think GeoServer is definitely the
 way
to go for the server since it is Java based and I had no trouble
 including
it in my ofbiz tomcat setup. There is an effort to consolidate many of
 the
various client packages (such as OpenLayers) and MapBuilder seems to be
 at
the forefront of that effort (it uses OpenLayers to render, but adds an
 XML
syntax for implementing client frontends.

It is a very exciting time for the GIS community as they are working
together to create products and mashups that are the same sort of
Goliath-killers in the GIS world that OFBiz is becoming in the ERP
 world.

I also did a GeoRSS interface so that I could add markers to Google
 Maps,
but I did not see how to add that to the ofbiz base code. I would be
 willing
to share that code if we can see where to add it. See
http://docs.codehaus.org/display/GEOSDOC/GeoRSS.

I think the WFS interface is the critical part, as it lets you use
 other
servers like GeoServer to server up the base GIS layers, but lets you
 use
OFBiz to store and server the points of interest. I only modeled
 points
with my WfsEventHandler class. It needs to be extended to do a
 rectangular
find. One of the key things that I did was implement the ogc:filter
using FreeMarker templates. That is the part that needs to be extended
 to
implement the rectangular find.

If you are not familiar with the WFS, WMS and WCS standards, you need
 to be.
They are what make all the synergy possible.

It has been a few months since I have had a chance to work on it (which
might as well be a few years at my age) so you might want to google
 gis
and ofbiz to see what else I had to say about it. I would be glad to
discuss and work on something more substantial for ofbiz, but I am not
actively working on GIS at the moment, so my time will be limited.

-Al

On 11/26/07, Chris Howe [EMAIL PROTECTED] wrote:

 I just completed a rather remedial GIS implementation (very poorly
 designed, but works for it's purpose).  Anyone have any
 interest/experience/intelligent thought with this?








Re: GIS Tools/modeling

2007-11-26 Thread Al Byers
Chris,

I am not sure that KML and KMZ are not better ways to go. I went the
community route because it just seems to fit in with OFBiz's philosophy
and even Google should be  (and I think is) using open source standards in
their work. I should be able to discuss the advantages and disadvantages of
the Google vs. the Geoserver/MapBuilder approaches, but I would have to
research the KML/Z tech more, first.

The question to me answered is whether or not KML/Z are as good at accessing
Geoserver servers as the MapBuilder product. If they don't do as good a job,
then I think that developers may sometimes wish to access data that is not
served up by Google Maps and won't be able to.

The other test for KML/Z is if you can do custom rollover popups with KML/Z.
It is easy to do simple ones, but sometimes you may wish to do more
complicated ones and I am not sure about the suitability of KML/Z for that -
though I would guess it does fine.

Please don't hesitate to discuss your issues here. Adding GIS to OFBiz would
be a really cool add-on and the more people we can involve, the better.

-Al

On 11/26/07, Chris Howe [EMAIL PROTECTED] wrote:

 Very interesting. My implementation is extremely crude in comparison.  I
 was only outputting KML and KMZ for Google Earth. It seems I have quite a
 bit of homework to do before being able to add very much to the discussion.

 - Original Message 
 From: Al Byers [EMAIL PROTECTED]
 To: dev@ofbiz.apache.org
 Sent: Monday, November 26, 2007 10:46:31 AM
 Subject: Re: GIS Tools/modeling


 Hey Chris,

 Yes, I did some GIS work a few months ago. What I did was add a WFS
 interface to OFBiz. It is WfsEventHandler class in webapp.event. I did
 a lot
 of work with GeoServer (http://docs.codehaus.org/display/GEOS/Home)
   and
 MapBuilder  (http://docs.codehaus.org/display/MAInterstinP/Home) for the
 client
 side.
 I used MySQL for a geo spatial DB. I think GeoServer is definitely the
 way
 to go for the server since it is Java based and I had no trouble
 including
 it in my ofbiz tomcat setup. There is an effort to consolidate many of
 the
 various client packages (such as OpenLayers) and MapBuilder seems to be
 at
 the forefront of that effort (it uses OpenLayers to render, but adds an
 XML
 syntax for implementing client frontends.

 It is a very exciting time for the GIS community as they are working
 together to create products and mashups that are the same sort of
 Goliath-killers in the GIS world that OFBiz is becoming in the ERP
 world.

 I also did a GeoRSS interface so that I could add markers to Google
 Maps,
 but I did not see how to add that to the ofbiz base code. I would be
 willing
 to share that code if we can see where to add it. See
 http://docs.codehaus.org/display/GEOSDOC/GeoRSS.

 I think the WFS interface is the critical part, as it lets you use
 other
 servers like GeoServer to server up the base GIS layers, but lets you
 use
 OFBiz to store and server the points of interest. I only modeled
 points
 with my WfsEventHandler class. It needs to be extended to do a
 rectangular
 find. One of the key things that I did was implement the ogc:filter
 using FreeMarker templates. That is the part that needs to be extended
 to
 implement the rectangular find.

 If you are not familiar with the WFS, WMS and WCS standards, you need
 to be.
 They are what make all the synergy possible.

 It has been a few months since I have had a chance to work on it (which
 might as well be a few years at my age) so you might want to google
 gis
 and ofbiz to see what else I had to say about it. I would be glad to
 discuss and work on something more substantial for ofbiz, but I am not
 actively working on GIS at the moment, so my time will be limited.

 -Al

 On 11/26/07, Chris Howe [EMAIL PROTECTED] wrote:
 
  I just completed a rather remedial GIS implementation (very poorly
  designed, but works for it's purpose).  Anyone have any
  interest/experience/intelligent thought with this?
 
 
 






Re: GIS Tools/modeling

2007-11-26 Thread BJ Freeman
might want to look at
http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct


Al Byers sent the following on 11/26/2007 8:46 AM:
 Hey Chris,
 
 Yes, I did some GIS work a few months ago. What I did was add a WFS
 interface to OFBiz. It is WfsEventHandler class in webapp.event. I did a lot
 of work with GeoServer (http://docs.codehaus.org/display/GEOS/Home)  and
 MapBuilder  (http://docs.codehaus.org/display/MAP/Home) for the client side.
 I used MySQL for a geo spatial DB. I think GeoServer is definitely the way
 to go for the server since it is Java based and I had no trouble including
 it in my ofbiz tomcat setup. There is an effort to consolidate many of the
 various client packages (such as OpenLayers) and MapBuilder seems to be at
 the forefront of that effort (it uses OpenLayers to render, but adds an XML
 syntax for implementing client frontends.
 
 It is a very exciting time for the GIS community as they are working
 together to create products and mashups that are the same sort of
 Goliath-killers in the GIS world that OFBiz is becoming in the ERP world.
 
 I also did a GeoRSS interface so that I could add markers to Google Maps,
 but I did not see how to add that to the ofbiz base code. I would be willing
 to share that code if we can see where to add it. See
 http://docs.codehaus.org/display/GEOSDOC/GeoRSS.
 
 I think the WFS interface is the critical part, as it lets you use other
 servers like GeoServer to server up the base GIS layers, but lets you use
 OFBiz to store and server the points of interest. I only modeled points
 with my WfsEventHandler class. It needs to be extended to do a rectangular
 find. One of the key things that I did was implement the ogc:filter
 using FreeMarker templates. That is the part that needs to be extended to
 implement the rectangular find.
 
 If you are not familiar with the WFS, WMS and WCS standards, you need to be.
 They are what make all the synergy possible.
 
 It has been a few months since I have had a chance to work on it (which
 might as well be a few years at my age) so you might want to google gis
 and ofbiz to see what else I had to say about it. I would be glad to
 discuss and work on something more substantial for ofbiz, but I am not
 actively working on GIS at the moment, so my time will be limited.
 
 -Al
 
 On 11/26/07, Chris Howe [EMAIL PROTECTED] wrote:
 I just completed a rather remedial GIS implementation (very poorly
 designed, but works for it's purpose).  Anyone have any
 interest/experience/intelligent thought with this?



 


Re: GIS Tools/modeling

2007-11-26 Thread Chris Howe
From an OFBiz community perspective KML/Z would just be an output manner 
(simply done through freemarker templates) as there doesn't seem to be a whole 
lot of interest in storing data in XML (I floated the Xindice integration 
earlier in the year and while it works there doesn't seem to be much 
interest).  The storage seems to be better through adding geospatial tables or 
a secondary database and then linking it to a contentId.  

I need to do quite a bit of homework on the issue as a whole before I bloviate 
on the issue.  The topics that need to be decide on would be:
1) storage format
2) retrieval/output format(s)
3) miscellaneous tools (centroid, area, perimeter, etc calculations)
4) possibly rendering tools (if online map overlays are too limiting)
Let me know if I'm missing areas while I get my reading list in order :-)

- Original Message 
From: Al Byers [EMAIL PROTECTED]
To: dev@ofbiz.apache.org
Sent: Monday, November 26, 2007 12:18:02 PM
Subject: Re: GIS Tools/modeling

Chris,

I am not sure that KML and KMZ are not better ways to go. I went the
community route because it just seems to fit in with OFBiz's
 philosophy
and even Google should be  (and I think is) using open source standards
 in
their work. I should be able to discuss the advantages and
 disadvantages of
the Google vs. the Geoserver/MapBuilder approaches, but I would have to
research the KML/Z tech more, first.

The question to me answered is whether or not KML/Z are as good at
 accessing
Geoserver servers as the MapBuilder product. If they don't do as good a
 job,
then I think that developers may sometimes wish to access data that is
 not
served up by Google Maps and won't be able to.

The other test for KML/Z is if you can do custom rollover popups with
 KML/Z.
It is easy to do simple ones, but sometimes you may wish to do more
complicated ones and I am not sure about the suitability of KML/Z for
 that -
though I would guess it does fine.

Please don't hesitate to discuss your issues here. Adding GIS to OFBiz
 would
be a really cool add-on and the more people we can involve, the better.

-Al

On 11/26/07, Chris Howe [EMAIL PROTECTED] wrote:

 Very interesting. My implementation is extremely crude in comparison.
  I
 was only outputting KML and KMZ for Google Earth. It seems I have
 quite a
 bit of homework to do before being able to add very much to the
 discussion.

 - Original Message 
 From: Al Byers [EMAIL PROTECTED]
 To: dev@ofbiz.apache.org
 Sent: Monday, November 26, 2007 10:46:31 AM
 Subject: Re: GIS Tools/modeling


 Hey Chris,

 Yes, I did some GIS work a few months ago. What I did was add a WFS
 interface to OFBiz. It is WfsEventHandler class in webapp.event. I
 did
 a lot
 of work with GeoServer (http://docs.codehaus.org/display/GEOS/Home)
   and
 MapBuilder  (http://docs.codehaus.org/display/MAInterstinP/Home) for
 the
 client
 side.
 I used MySQL for a geo spatial DB. I think GeoServer is definitely
 the
 way
 to go for the server since it is Java based and I had no trouble
 including
 it in my ofbiz tomcat setup. There is an effort to consolidate many
 of
 the
 various client packages (such as OpenLayers) and MapBuilder seems to
 be
 at
 the forefront of that effort (it uses OpenLayers to render, but adds
 an
 XML
 syntax for implementing client frontends.

 It is a very exciting time for the GIS community as they are working
 together to create products and mashups that are the same sort of
 Goliath-killers in the GIS world that OFBiz is becoming in the ERP
 world.

 I also did a GeoRSS interface so that I could add markers to Google
 Maps,
 but I did not see how to add that to the ofbiz base code. I would be
 willing
 to share that code if we can see where to add it. See
 http://docs.codehaus.org/display/GEOSDOC/GeoRSS.

 I think the WFS interface is the critical part, as it lets you use
 other
 servers like GeoServer to server up the base GIS layers, but lets you
 use
 OFBiz to store and server the points of interest. I only modeled
 points
 with my WfsEventHandler class. It needs to be extended to do a
 rectangular
 find. One of the key things that I did was implement the
 ogc:filter
 using FreeMarker templates. That is the part that needs to be
 extended
 to
 implement the rectangular find.

 If you are not familiar with the WFS, WMS and WCS standards, you need
 to be.
 They are what make all the synergy possible.

 It has been a few months since I have had a chance to work on it
 (which
 might as well be a few years at my age) so you might want to google
 gis
 and ofbiz to see what else I had to say about it. I would be glad
 to
 discuss and work on something more substantial for ofbiz, but I am
 not
 actively working on GIS at the moment, so my time will be limited.

 -Al

 On 11/26/07, Chris Howe [EMAIL PROTECTED] wrote:
 
  I just completed a rather remedial GIS implementation (very poorly
  designed, but works for it's purpose).  Anyone have any
  interest/experience/intelligent thought with this?