[mapguide-users] OGR Provider w/ PostGIS Support

Andrew DeMerchant andrew.demerchant at gemtec.ca
Wed Jun 28 09:13:20 EDT 2006

....sorry, that's really directed at the OSGeo FDO, not the OGR. My 
mistake. I'm going to repost with the right subject line.


Andrew DeMerchant wrote:

> It seems that the problem was that the FDO doesn't like spaces in 
> table names. The error log said that the FDO was causing a "Syntax 
> error in FROM clause". Is this something that can be fixed? It should 
> be a pretty simple fix, really..since I'd guess that all that needs to 
> be done is to enclose table names (and field names, for that matter) 
> in square brackets (ie, [Table Name], or [Table Name].[Field Name]). 
> The work around for me for now is to make another Access database and 
> link all of the tables from my real database. In this new database, I 
> just rename the tables to get rid of the spaces. But I can't really 
> rely on his workaround, because having to change table names means 
> changing a lot of other things for other projects (this database is 
> used in a lot of other ways, not just MapGuide). Is there any chance 
> that this FDO can get modified to account for these spaces?
> Andrew
> Traian Stanev wrote:
>> Start the server in interactive mode from the command line, using 
>> mgserver /interactive. Try to preview your layer and see if any OGR 
>> provider error/warning prints on the command line. Also, check your 
>> server Error.log for any Fdo exceptions.
>> Traian
>>     -----Original Message-----
>>     *From:* Andrew DeMerchant [mailto:andrew.demerchant at gemtec.ca]
>>     *Sent:* Tue 6/27/2006 4:09 PM
>>     *To:* users at mapguide.osgeo.org
>>     *Cc:*
>>     *Subject:* Re: [mapguide-users] OGR Provider w/ PostGIS Support
>>     Same thing here...I can't seem to get any of my points to show
>>     up, no matter what I do. Anyone have a step by step guide, incase
>>     we're missing something? I've got my data in, and have "Geometry"
>>     checked for my table...I have a northing and an easting field as
>>     well as a projection. Made a new layer using that data, and told
>>     Studio to use "Geometry" for Geometry (seemed logical
>>     enough!)...but nothing shows up in my preview.
>>     Andrew
>>     Curtis W. Ruck wrote:
>>>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:
>>>>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 
>>>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,
>>     -- 
>>     	*Andrew DeMerchant*
>>     *Computer Technologist*
>>     ph.1-877-4GEMTEC x.163
>>     fax 506-453-9470
>>     /GEMTEC Limited <http://www.gemtec.ca>
>>     /191 Doak Road
>>     Fredericton, NB, Canada
>>     E3C 2E6
> -- 
> 	*Andrew DeMerchant*
> *Computer Technologist*
> ph.1-877-4GEMTEC x.163
> fax 506-453-9470
> /GEMTEC Limited <http://www.gemtec.ca>
> /191 Doak Road
> Fredericton, NB, Canada
> E3C 2E6

	*Andrew DeMerchant*
*Computer Technologist*
ph.1-877-4GEMTEC x.163
fax 506-453-9470

/GEMTEC Limited <http://www.gemtec.ca>
/191 Doak Road
Fredericton, NB, Canada
E3C 2E6

-------------- next part --------------
Skipped content of type multipart/related

More information about the Mapguide-users mailing list