MapExport MAP3D 2018 to PostgreSQL / PostGIS

MapExport MAP3D 2018 to PostgreSQL / PostGIS

Anonymous
Not applicable
4,063 Views
12 Replies
Message 1 of 13

MapExport MAP3D 2018 to PostgreSQL / PostGIS

Anonymous
Not applicable

Hi..

 

Please let me know how to export polygon objects to PostgreSQL database from Auto desk map3d 2018 

installed PostgreSQL 9.6 and postgis 2.2 on Linux host . 

 

i am able to connect PostgreSQL from autocad map3d 2018(installed on windows) fdo connection and able to create database in 

PostgreSQL.

 

i didn't see the PostgreSQL fdo connection with  the command " Mapexportfdo " to export polygon objects to PostgreSQL database.

 

please help me out with the procedure to export object to PostgreSQL.

 

Thanks in advance

 

Satish

 

0 Likes
4,064 Views
12 Replies
Replies (12)
Message 2 of 13

braudpat
Mentor
Mentor

 

Hello from France

 

Welcome to the Autodesk / AutoCAD Forums

 

SORRY my answer is not "very positive" !?

 

1) I am not sure at all that ACAD MAP 20IX is able to do a MAPEXPORTFDO to a Spatial PostGIS Database !?

 

2) MAP 201X is able to to do a MAPEXPORTFDO to a Spatial Oracle Database for a long time ...

https://forums.autodesk.com/t5/autocad-map-3d-forum/mapexportfdo-to-fdo-oracle-with-user-defined-sri...

 

3) And maybe MAP 201X is able to do the same with MS-SQL Server Spatial Database !?

 

Waiting for the answer of a PostGIS and MAP 201X Specialist ??

 

Regards, Patrice

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 3 of 13

Anonymous
Not applicable

Hi Satish,

 

I have neither PostGIS nor Map 2018 - so I'm just guessing.

 

You said you created a database - did you create any schema/tables (I dont know how exactly PostGres/PostGIS works)?

When you connect to PostGIS through FDO - do you see any tables?

 

I'm not sure - maybe the connection only appears if there are any tables.

 

Rob

0 Likes
Message 4 of 13

Anonymous
Not applicable
Hi Rob..

I don't think tables are necessary to view the connection. More over I have
Connected to a sample schema which is having few tables.
In case of oracle fdo we can create spatial schema from autocad itself and
we can see it
before creating any tables in it.
In postgresql I'm able to create spatial schema and connected to that. But
when come to export I'm not able to see that.

I tried with postgresql and postgis installed in Windows. But no luck

Thanks
Satish
0 Likes
Message 5 of 13

Anonymous
Not applicable

Hi,

 

I did a quick test with Map 2017 and PostGIS (on Linux) - I have the same issue, data connection doesnt appear in the MapexportFDO dialog box.

 

In Map help (2017) there is one entry for "mapexportfdo" about an issue when exporting to ArcSDE. There is also a screenshot where some information is displayed about the mapexportfdo command and it reads like: "Move drawing object data into database data stores (for example Oracle, ArcSDE, SQL Server Spatial) to which you have connected in AutoCAD Map 3D.".

 

So, it is not clear whether PostGIS is supported or not - I would guess it is but maybe it isn't.

 

To move your CAD data into PostGIS you can either:

- export your drawing data as SDF/SQLite/SHP (command: mapexport)
- connect to exported data and to PostGIS database and perform a BulkCopy

 

or

 

- connect to PostGIS, add tables(Layers) to drawing
- in FDO layer context menu chose "new feature from geometry" and select CAD object

 

Second approach is suitable only if you have few CAD objects as you need to pick each CAD object on its own.


Rob

Message 6 of 13

braudpat
Mentor
Mentor

 

Hello

 

1) This FDO command has been written for Oracle Spatial (If I remember well) !

 

2) Not sure that it is OK for SQL-Server Spatial ?

 

3) And I think it is NOK for PostGIS !

 

Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 7 of 13

Anonymous
Not applicable

Patrice..

 

Command same for Oracle and Mssql saptial , hope it is same for all FDO Connections . 

waiting for more suggestions  from all experts..

 

Thanks 

Satish

0 Likes
Message 8 of 13

kajar
Advocate
Advocate

Command MAPEXPORTTOFDO works only with Oracle, ArcSDE and SQL Server, for PostgreSQL/Postgis you cant use it.

This is the feature I have missed a long time and its still missing in version 2018.

So you have to use bulk copy to export featured to Postgis.

 

Kajar

 

Message 9 of 13

braudpat
Mentor
Mentor

 

Hello Mr Kajar

 

Thanks for your MAPEXPORTFDO Expertise ! So Kudos for you !!

 

I have used it ONLY with Oracle ... And I have not any MS-SQL / ArcSDE / PostGis Server

 

Regards, Patrice

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


0 Likes
Message 10 of 13

Anonymous
Not applicable

Hi..

 

found short-term solution with qgis , imported  dxf format to postgresql. and it also allows other formats like shape , dgn etc

 

 

Thanks

Satish 

0 Likes
Message 11 of 13

Anonymous
Not applicable

Hi Satish/All,

 

Can someone help the export steps to PostGIS.

 

Thanks,
Ravi

0 Likes
Message 12 of 13

kajar
Advocate
Advocate

At first you must export Autocad objects to SQLITE, SHP or SDF and then use bulk copy tool for inserting features to Postgis table.

Another  option is to use Qgis.

Kajar

 

0 Likes
Message 13 of 13

Anonymous
Not applicable

Hi Kajar/All,

 

I can connect  & read data PostGIS DB successfully. when i try to Connect to FDO, I am unable to find data sources. Please advise.

 export.PNG

Thanks,

Ravi

0 Likes