[postgis-users] How to Spatialize DB on PostGIS?
Simon Greener
simon at spatialdbadvisor.com
Wed Oct 7 20:06:00 PDT 2009
Kristi,
Why not use ogr2ogr to upload your TAB files into PostGIS.
Then, when you have them loaded, ensure each table has a primary key defined on a unique integer field and a spatial index created. You can do this in pgAdmin III.
Then, start up MapInfo and click the "Make DBMS Table Mappable" button (Tools>DBMS Catalog). This will then allow MapInfo to create the necessary mapinfo_mapcatalog entry including the right geometry type (point, line, polygon). Follow the menus and fill everything in.
After making the table mappable then click the "Open DBMS Table" button and follow the bouncing ball wrt the menu options.
regards
Simon
On Thu, 08 Oct 2009 13:03:48 +1100, Endah Kristi <kristye_e at yahoo.com> wrote:
> Hi Richard,
> I’ve never attempted to “spatialize” my db before using Easy Loader (because I don’t know how to do that, hehe).
> I don’t have constraints on my table. I’m using PostGIS-pg83-1.3.6-1 and PostgreSQL v8.3.7-1.
> I’ve asked this to PBBI APAC Sydney, and Jesse Hoobler and engineering team told that this problem appeared because I’m not hitting the spatialized database, database has to be spatialized one. They told this is outside of MapInfo domain. So I thought I should do something in PostGIS. I’ll try to ask on the MapInfo-L, I don’t join yet.
> A long time ago, I’ve found the same problem on MapInfo Spatialware, the polygon & polyline can’t be uploaded properly into SQL Server before it’s spatialized. Then I run a script to spatialize that on SQL Server, and I was able to upload them properly. So I thought that PostGIS is the same problem, but if I’m wrong, maybe any advice for me?
> Kristi
>
>
> --- On Wed, 10/7/09, Richard Greenwood <richard.greenwood at gmail.com> wrote:
>
>
> From: Richard Greenwood <richard.greenwood at gmail.com>
> Subject: Re: [postgis-users] How to Spatialize DB on PostGIS?
> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
> Date: Wednesday, October 7, 2009, 9:55 AM
>
>
> Kristi,
>
> I think that you should NOT "spatialize" your db. In MapInfo
> terminology, "spatializing" your db allowed you to save point objects
> in databases that were not spatial. PostGIS is already spatial, and
> can store polylines and polygons. Did you attempt to "spatialize" your
> db before using easy loader? That might explain why you are only able
> to save points. You should be able to store points, lines, and
> polygons, all in the same table, from MapInfo into PostGIS.
>
> Check that you do not have constraints on your table that restrict it
> to points. e.g. use Pgadmin and look at the constraints on the table.
> Which versions of Postgres/PostGIS are you using?
>
> I'd suggest that you post your questions on the MapInfo-L as well as
> here, because your problem sounds like it may be on the MapInfo side
> of the equation.
>
> Good luck!
> Rich
>
>
> On Tue, Oct 6, 2009 at 11:29 PM, Endah Kristi <kristye_e at yahoo.com> wrote:
>>
>> Hi Richard,
>>
>> I mean that I've tried to upload that using Easy Loader > ODBC > Map Catalog also created > Upload into PostGIS -- but there are warning messages for polyline & polygon objects that they become points (please find the attachment). When I downloaded it in MapInfo for the data that I've uploaded into PostGIS, the polyline & polygon objects become points. There is no problem with the point object. There are problems for graphical objects, no problem to edit the attribute data (link to PostGIS). So I think, does it need we should do spatialize db in PostGIS? I don't know how to do that. Or maybe there is any setting that I should do in MIPro or PostGIS? Please advice.
>>
>> Regards,
>> Kristi
>>
>>
>> --- On Tue, 10/6/09, Richard Greenwood <richard.greenwood at gmail.com> wrote:
>>
>> From: Richard Greenwood <richard.greenwood at gmail.com>
>> Subject: Re: [postgis-users] How to Spatialize DB on PostGIS?
>> To: "PostGIS Users Discussion" <postgis-users at postgis.refractions.net>
>> Date: Tuesday, October 6, 2009, 8:43 AM
>>
>>
>>
>> On Tue, Oct 6, 2009 at 6:22 AM, Endah Kristi <kristye_e at yahoo.com> wrote:
>>>
>>> Dear All,
>>>
>>> Apologies first, I'm not familiar with PostGIS/PostgreSQL. Could you please explain to me how to spatialize the database on PostGIS? I've installed PostGIS v1.3 and PostgreSQL v8.3.1 for MapInfo Pro v10, but I can't upload .TAB files to PostGIS successfully (for polygon & polyline objects -- it become points when uploaded), whereas MIPro v10 supports read/write for PostGIS. I think it needs spatialize db first. Appreciate if anyone here can advise me how to do that on PostGIS, the steps and its script. Thanks in advance! =)
>>
>> Use "EasyLoader" in the MapInfo Tools > Tool Manager menu.
>> Click "ODBC" button and select or create an ODBC connection to your PostGIS db
>> Click "Map Catalog" which will create mapinfo.mapinfo_mapcatalog in your PostGIS db
>> Select "Source Tables"
>> Click "Upload"
>>
>> --
>> Richard Greenwood
>> richard.greenwood at gmail.com
>> www.greenwoodmap.com
>>
>> -----Inline Attachment Follows-----
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>
>
>
> --
> Richard Greenwood
> richard.greenwood at gmail.com
> www.greenwoodmap.com
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
>
>
>
--
SpatialDB Advice and Design, Solutions Architecture and Programming,
Oracle Database 10g Administrator Certified Associate; Oracle Database 10g SQL Certified Professional
Oracle Spatial, SQL Server, PostGIS, MySQL, ArcSDE, Manifold GIS, FME, Radius Topology and Studio Specialist.
39 Cliff View Drive, Allens Rivulet, 7150, Tasmania, Australia.
Website: www.spatialdbadvisor.com
Email: simon at spatialdbadvisor.com
Voice: +61 362 396397
Mobile: +61 418 396391
Skype: sggreener
Longitude: 147.20515 (147° 12' 18" E)
Latitude: -43.01530 (43° 00' 55" S)
GeoHash: r22em9r98wg
NAC:W80CK 7SWP3
More information about the postgis-users
mailing list