Discussion:
[mapguide-users] How to connect the Postgres database table to MapGuide?
nandankishorks
2012-07-31 12:50:08 UTC
Permalink
I have added a .shp file into MapGuide Maestro, now I want to connect a
Postgres database table to added layer.

How to connect/link the table to defined layer in MapGuide.

I am using MapGuide 2.2.x , MapGuide Maestro 4.0.1 and FDO 1.0.0



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Jackie Ng
2012-07-31 15:34:21 UTC
Permalink
Create a new Feature Source using the OSGeo PostgreSQL provider. Specify
username/password/server/datastore and save it.

Assuming this datastore has spatially-enabled tables, you can now create
layers off of that feature source that you just saved.

- Jackie



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126p4992200.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
nandankishorks
2012-08-01 04:21:56 UTC
Permalink
Hi Jackie,

I have already added the Postgres layers into MapGuide and saved it. Now
I have link the added layers with another RDBMS tables(Non-Spatial) that is
in PostgreSQL. Is it possible in the MapGuide, please help me from this.

Thanks in advance..



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126p4992289.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Jackie Ng
2012-08-01 04:37:27 UTC
Permalink
Create an Extended Feature Class on your *primary* Feature Source that joins
to your non-spatial table in your Postgres Feature Source. The resulting
Extended Feature Class presents a joined view of the two sets of data.

Only recommended if you're on 2.4, and if joining on a single
column/property. Feature Join performance really sucks in previous versions,
and buggy too.

- Jackie



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126p4992291.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
nandankishorks
2012-08-01 05:43:55 UTC
Permalink
Thank u very much *Jackie*.

I am very sorry, if I am asking a basic thing, where I have to Create an
Extended Feature Class and How. Can you please explain me(Any pdf or doc for
reference).

Thanks in advance...





--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126p4992300.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
nandankishorks
2012-08-01 12:56:44 UTC
Permalink
I'm working on project, for that i have already added a spatial
table(District info: gid, dist_code, district_name, area, perimeter,
the_geom) of polygon shapefile into MapGuide.
Also, I have a couple of tables in Postgres datbase that have typical
population info: id, dist_code, population, male_population,
female_population, literacy, male_literacy, female_literacy etc.
Now I have to link the Non-Spatial table to the district_info layer.
Anyone have any experience with this sort of project and can point me to
examples or suggestions I should be looking at?

I am using MapGuide 2.4. MapGuide Maestro 5.0b2 and FDO 1.0.0






-----
-Nandan
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126p4992409.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Zac Spitzer
2012-08-02 04:47:09 UTC
Permalink
the best approach when working with a database (as opposed to shp,sdf etc)
is to create a view which combines the tables and presents the data
as you require it.

I haven't done this myself with postgis, but with oracle, once the
view is created,
you need to define the primary key and create an entry in the
SDO_GEOM_METADATA tables, that way you satisfy the FDO requirement
of a primary key and a spatial column

z


On Wed, Aug 1, 2012 at 10:56 PM, nandankishorks
Post by nandankishorks
I'm working on project, for that i have already added a spatial
table(District info: gid, dist_code, district_name, area, perimeter,
the_geom) of polygon shapefile into MapGuide.
Also, I have a couple of tables in Postgres datbase that have typical
population info: id, dist_code, population, male_population,
female_population, literacy, male_literacy, female_literacy etc.
Now I have to link the Non-Spatial table to the district_info layer.
Anyone have any experience with this sort of project and can point me to
examples or suggestions I should be looking at?
I am using MapGuide 2.4. MapGuide Maestro 5.0b2 and FDO 1.0.0
-----
-Nandan
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126p4992409.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
http://lists.osgeo.org/mailman/listinfo/mapguide-users
--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
nandankishorks
2012-08-02 05:14:25 UTC
Permalink
Thanks Zspitzer for your suggestion, i will try it now...



-----
-Nandan
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-connect-the-Postgres-database-table-to-MapGuide-tp4992126p4992593.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

Loading...