[mapguide-users] OGR Provider w/ PostGIS Support

Curtis W. Ruck ruckc at yahoo.com
Mon Jun 26 13:42:03 EDT 2006


Wow, thanks, i added the view into the geometry columns table and it appears in mapguide....
 
Also date fields showup in mapguide studio...
 
the server stops crashing now that i can place a filter on the data...
 
Now i just can't get the layer of dots from my massive table ran though a view and filtered to appear on the map (ajax).  (The DWF viewer doesn't even show the other raster layers).
 
I have the style set to 0 to Infinity with a  black dot.... this query should have approximately 1000 dots showing...
 
Curtis Ruck
 
Curtis W. Ruck wrote:
> Alright,
> 
> I know the OGR Provider w/ PostGIS is kinda new.  Because I think the
> mapguide set of tools has the best interface and ease of use I want to see
> it survive.
> 
> I am currently having a few issues with this: 
 > 1) When i setup the data
> layer in MapGuide Studio i can't choose a view from postgres.  I can only
> choose a table.  As a workaround i wanted to see if i could filter the
> data, which brings me to number 2 
Curtis,
I have reviewed the OGR Postgres/PostGIS driver code, and it seems that
if a named view were listed in the geometry_columns table it would
get listed as a layer of the file.  I haven't tried this myself to verify.
The following query is used to get a list of all tables/views to be
represented as layers through OGR.
SELECT c.relname FROM pg_class c, geometry_columns g
         WHERE (c.relkind in ('r','v') AND c.relname !~ '^pg'
                     AND c.relname::TEXT = g.f_table_name::TEXT)
I think this selects all relations (tables) of type 'r' or 'v' (which
I assume is table and view) for which the name does not start with 'pg'
and for which the name is in the geometry_columns table.
 > 2) I want to filter the data on a
> timestamp field.  In the MapGuide Studio interface i can't select the
> timestamp field to do a filter with.
OGR 1.3.2 does support postgres timestamp fields internally as a date field.
Possibly date type fields are not handled properly by the OGR FDO provider?
 >  3) Because i can't do the two top
> items, its crashing the mapguide server because the table i am trying to
> draw on the screen has some odd 300,000 records all with a geometry column.
> Other than that though it looks good, just wish it would work.
Crashing?  Hmm, I would have expected it just to be slow.
Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org
 




More information about the Mapguide_users mailing list