Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

mitab · MITAB Users List

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 1076 - 1105 of 1438   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1076 From: "Martin Higham" <martin@...>
Date: Wed Apr 12, 2006 12:56 pm
Subject: RE: Bug with coordsys?
imhigham
Send Email Send Email
 
Hi Uffe,

Make sure you have MITAB_AFFINE_PARAMS defined for your project.  Although
it appears that this define is optional, it is required otherwise the tab
files can't be read in MapInfo as you have found.

Cheers,
Martin


Martin Higham
Avantra Geosystems

tel (61 3) 8504 0428  mob 0425 730428
fax (61 3) 9596 7997
www.avantra.com.au



> -----Original Message-----
> From: mitab@yahoogroups.com [mailto:mitab@yahoogroups.com]On Behalf Of
> Uffe Kousgaard
> Sent: Wednesday, 12 April 2006 20:37
> To: MITAB
> Subject: [mitab] Bug with coordsys?
>
>
> I have a MIF file, which tab2tab converts, but the resulting tab file is
> invalid, when I try to open in MapInfo. This is the header:
>
> Version 300
> Delimiter ","
> CoordSys Earth Projection 1, 0
> Columns 1
>   Result Decimal(11,3)
> Data
> Point -72.10072 41.350398
>     Symbol(34,0,5)
> etc.
>
> MITAB 1.4.0 translates it OK and MapInfo can also import the MIF
> file. MITAB
> 1.5.0 Beta 1 has the same error.
>
> When I look at the headers of the map file generated by version 1.4.0 and
> 1.5.0 they are different in the area byte 200-240 (hex), which is affine
> projection parameters ??
>
> Regards
> Uffe
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

#1077 From: "Uffe Kousgaard" <uffe@...>
Date: Wed Apr 12, 2006 2:10 pm
Subject: Re: Bug with coordsys?
haansus
Send Email Send Email
 
Hi,

"My project" is the official mitab.dll and that one is broken as it is right
now. So is the official tab2tab.exe, I discovered.

Regards
Uffe

----- Original Message -----
From: "Martin Higham" <martin@...>
To: <mitab@yahoogroups.com>
Sent: Wednesday, April 12, 2006 2:56 PM
Subject: RE: [mitab] Bug with coordsys?


> Hi Uffe,
>
> Make sure you have MITAB_AFFINE_PARAMS defined for your project.  Although
> it appears that this define is optional, it is required otherwise the tab
> files can't be read in MapInfo as you have found.
>
> Cheers,
> Martin
>
>
> Martin Higham
> Avantra Geosystems
>
> tel (61 3) 8504 0428  mob 0425 730428
> fax (61 3) 9596 7997
> www.avantra.com.au
>
>
>
>> -----Original Message-----
>> From: mitab@yahoogroups.com [mailto:mitab@yahoogroups.com]On Behalf Of
>> Uffe Kousgaard
>> Sent: Wednesday, 12 April 2006 20:37
>> To: MITAB
>> Subject: [mitab] Bug with coordsys?
>>
>>
>> I have a MIF file, which tab2tab converts, but the resulting tab file is
>> invalid, when I try to open in MapInfo. This is the header:
>>
>> Version 300
>> Delimiter ","
>> CoordSys Earth Projection 1, 0
>> Columns 1
>>   Result Decimal(11,3)
>> Data
>> Point -72.10072 41.350398
>>     Symbol(34,0,5)
>> etc.
>>
>> MITAB 1.4.0 translates it OK and MapInfo can also import the MIF
>> file. MITAB
>> 1.5.0 Beta 1 has the same error.
>>
>> When I look at the headers of the map file generated by version 1.4.0 and
>> 1.5.0 they are different in the area byte 200-240 (hex), which is affine
>> projection parameters ??
>>
>> Regards
>> Uffe
>>
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>

#1078 From: Daniel Morissette <dmorissette@...>
Date: Wed Apr 12, 2006 2:23 pm
Subject: Re: Bug with coordsys?
dan_morissette
Send Email Send Email
 
Uffe Kousgaard wrote:
> Hi,
>
> "My project" is the official mitab.dll and that one is broken as it is right
> now. So is the official tab2tab.exe, I discovered.
>

That's correct, the official mitab.dll and tab2tab.exe would suffer of
the same problem. I'll need to issue a new release with this fixed.

Daniel
--
Daniel Morissette
http://www.mapgears.com/

#1079 From: "Uffe Kousgaard" <uffe@...>
Date: Fri Apr 21, 2006 2:04 pm
Subject: Re: Bug with coordsys?
haansus
Send Email Send Email
 
From: "Daniel Morissette" <dmorissette@...>

> That's correct, the official mitab.dll and tab2tab.exe would suffer of
> the same problem. I'll need to issue a new release with this fixed.

In the meantime I have compiled a new release of the DLL:
http://www.routeware.dk/download/mitab_dll_150.zip

I have added this line:
#define MITAB_AFFINE_PARAMS 1

To these files:
mitab/mitab_capi.cpp
mitab/mitab_coordsys.cpp
mitab/mitab_spatialref.cpp
ogr/ogr_spatialref.h

The problem seems solved.

Regards
Uffe

#1080 From: "Ben" <crane_ba@...>
Date: Tue Apr 25, 2006 8:38 am
Subject: MITAB FAQ's
crane_ba
Send Email Send Email
 
Hi all,

I haven't actually used MITAB yet, but have a couple questions before
I delve in. I hope it's okay?

1. I don't have much C/C++ experience, I run on Windows XP and need
to know if using the MITAB libraries will be problematic. Do I need
to compile these C libraries or once installed can I just refer to
the *.h files in a C/C++ program? Basically, what do I need to do to
ensure successful installation on Win XP

2. I am planning on using the MITAB libraries within a web context.
I'm hoping to convert TAB files into SVG files on the fly using
possibly PHP, maybe ASP. I am also planning on allowing edits to
data, both geographic and attribute and then saving the TAB file with
the changes.

In a sense this is process I have in mind:

SVG <- PHP <- TAB (display only (create on-the-fly SVG files))
SVG -> PHP -> TAB (write changes made at the browser to the TAB file)

In short, I want to read/write TAB files on a server, and allow a
user clientside to see, edit the data and this then to alter the TAB
file on the server.

Is this possible? my average TAB file is extremely small, only 30
polygons or so, with limited attribute data.

Thanx,
Ben

#1081 From: Tony Lee <ligengtaowork@...>
Date: Tue May 9, 2006 10:39 am
Subject: How can i use the MITAB in EVC?
ligengtaowork
Send Email Send Email
 

Hi,everyone,
 
      Who can tell me how can i use the mitab library in EVC,on the Windows CE platform.
      Thanks.
 
                                          Tony Lee
                                           06/5/9


ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ

#1082 From: "Ned Harding" <NHARDING@...>
Date: Fri May 12, 2006 6:36 pm
Subject: Limits?
NHARDING@...
Send Email Send Email
 
I have a region that has 43,352 polygons and 776,172 points.  MiTab is able to create a TAB file out of it, but MapInfo doesn't see the resulting object.  Is there a limit that I'm running in to that doesn't create an error in MiTab.  I can post it as a SHP file if anyone has any ideas and wants to try debugging it.
 
ned.

#1083 From: "off_beach" <__foo__@...>
Date: Mon Jun 5, 2006 3:27 am
Subject: Mitab and Microsoft Map
off_beach
Send Email Send Email
 
Hi, all

it was possible to use the MiTab to index MapInfo files for the
Microsoft Map in Excel 97  ... but if not works with the Excell 2000:
datainst see the indexes, but the Excel failed to link data to them ...

Any clue?


Ivan Ivanov

#1084 From: "scumhampton" <tsmith@...>
Date: Mon Jun 5, 2006 8:59 am
Subject: Locating features in a particular area
scumhampton
Send Email Send Email
 
Hi,

I have to say I'm really impressed with mitab.

I'm creating my own map renderer - much like MapX. Primarily I will
use Navteq Street data.

The problem I have is with large data sets. Currently my application
loads an entire layer into ram at the start (e.g. minor roads). This
is not a problem for Luxembourg, but when I load the whole of Europe
into ram, as you can imagine, things start to become an issue.

I know loading all the data at once is not the right thing to do - I
only need to load the area that I am currenly displaying. But how?
How do I find the ID of the features that should be displayed? I
guess I need some sort of geospatial look-up table. How does MapInfo
do it - it must load from the file dynamically as you pan. Is this
possible with mitab - or would I need to create my own special look-
up table?

Any help would be appreciated.

Kind regards

Tim

#1085 From: Daniel Morissette <dmorissette@...>
Date: Mon Jun 5, 2006 4:27 pm
Subject: Re: Locating features in a particular area
dan_morissette
Send Email Send Email
 
scumhampton wrote:
> Hi,
>
> I have to say I'm really impressed with mitab.
>
> I'm creating my own map renderer - much like MapX. Primarily I will
> use Navteq Street data.
>

Maybe you should have a look at MapServer
(http://mapserver.gis.umn.edu/), it does exactly that and much more, and
it uses the MITAB library (part of GDAL/OGR) to access MapInfo TAB files
directly.

> The problem I have is with large data sets. Currently my application
> loads an entire layer into ram at the start (e.g. minor roads). This
> is not a problem for Luxembourg, but when I load the whole of Europe
> into ram, as you can imagine, things start to become an issue.
>
> I know loading all the data at once is not the right thing to do - I
> only need to load the area that I am currenly displaying. But how?
> How do I find the ID of the features that should be displayed? I
> guess I need some sort of geospatial look-up table. How does MapInfo
> do it - it must load from the file dynamically as you pan. Is this
> possible with mitab - or would I need to create my own special look-
> up table?
>

The TAB datasets (specifically the .map file) contains a spatial index.
The MITAB C API doesn't provide any way to use it, but through the C++
classes, you can use the OGRLayer::SetSpatialFilter() method:

    http://ogr.maptools.org/classOGRLayer.html#a3

Daniel
--
Daniel Morissette
http://www.mapgears.com/

#1086 From: Shamim <shamimameer@...>
Date: Tue Jun 6, 2006 6:36 am
Subject: Re: Locating features in a particular area
shamimameer
Send Email Send Email
 
Try to google spatial indexing.

--- Daniel Morissette <dmorissette@...>
wrote:

> scumhampton wrote:
> > Hi,
> >
> > I have to say I'm really impressed with mitab.
> >
> > I'm creating my own map renderer - much like MapX.
> Primarily I will
> > use Navteq Street data.
> >
>
> Maybe you should have a look at MapServer
> (http://mapserver.gis.umn.edu/), it does exactly
> that and much more, and
> it uses the MITAB library (part of GDAL/OGR) to
> access MapInfo TAB files
> directly.
>
> > The problem I have is with large data sets.
> Currently my application
> > loads an entire layer into ram at the start (e.g.
> minor roads). This
> > is not a problem for Luxembourg, but when I load
> the whole of Europe
> > into ram, as you can imagine, things start to
> become an issue.
> >
> > I know loading all the data at once is not the
> right thing to do - I
> > only need to load the area that I am currenly
> displaying. But how?
> > How do I find the ID of the features that should
> be displayed? I
> > guess I need some sort of geospatial look-up
> table. How does MapInfo
> > do it - it must load from the file dynamically as
> you pan. Is this
> > possible with mitab - or would I need to create my
> own special look-
> > up table?
> >
>
> The TAB datasets (specifically the .map file)
> contains a spatial index.
> The MITAB C API doesn't provide any way to use it,
> but through the C++
> classes, you can use the
> OGRLayer::SetSpatialFilter() method:
>
>    http://ogr.maptools.org/classOGRLayer.html#a3
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
>
>
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1087 From: "Tim Smith" <tsmith@...>
Date: Tue Jun 6, 2006 9:53 am
Subject: RE: Locating features in a particular area
scumhampton
Send Email Send Email
 
>The TAB datasets (specifically the .map file) contains a spatial index.
>The MITAB C API doesn't provide any way to use it, but through the C++
>classes, you can use the OGRLayer::SetSpatialFilter() method:

Thanks Daniel,
I tried this with the area I'm viewing and it has reduced the amount of
features, which is great.
Is it possible to use SetSpatialFilter to dynamically filter the features I
require as part of a map renderer?
i.e. would this be feasible from a performance perspective?

Thanks again for your quick reply.

Tim



-----Original Message-----
From: mitab@yahoogroups.com [mailto:mitab@yahoogroups.com] On Behalf Of Daniel
Morissette
Sent: 05 June 2006 17:28
To: mitab@yahoogroups.com
Subject: Re: [mitab] Locating features in a particular area


scumhampton wrote:
> Hi,
>
> I have to say I'm really impressed with mitab.
>
> I'm creating my own map renderer - much like MapX. Primarily I will
> use Navteq Street data.
>

Maybe you should have a look at MapServer
(http://mapserver.gis.umn.edu/), it does exactly that and much more, and
it uses the MITAB library (part of GDAL/OGR) to access MapInfo TAB files
directly.

> The problem I have is with large data sets. Currently my application
> loads an entire layer into ram at the start (e.g. minor roads). This
> is not a problem for Luxembourg, but when I load the whole of Europe
> into ram, as you can imagine, things start to become an issue.
>
> I know loading all the data at once is not the right thing to do - I
> only need to load the area that I am currenly displaying. But how?
> How do I find the ID of the features that should be displayed? I
> guess I need some sort of geospatial look-up table. How does MapInfo
> do it - it must load from the file dynamically as you pan. Is this
> possible with mitab - or would I need to create my own special look-
> up table?
>

The TAB datasets (specifically the .map file) contains a spatial index.
The MITAB C API doesn't provide any way to use it, but through the C++
classes, you can use the OGRLayer::SetSpatialFilter() method:

    http://ogr.maptools.org/classOGRLayer.html#a3

Daniel
--
Daniel Morissette
http://www.mapgears.com/







Yahoo! Groups Links







______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

#1088 From: Daniel Morissette <dmorissette@...>
Date: Tue Jun 6, 2006 2:17 pm
Subject: Re: Locating features in a particular area
dan_morissette
Send Email Send Email
 
Tim Smith wrote:
>
> Thanks Daniel,
> I tried this with the area I'm viewing and it has reduced the amount of
> features, which is great.
> Is it possible to use SetSpatialFilter to dynamically filter the
> features I require as part of a map renderer?
> i.e. would this be feasible from a performance perspective?
>

Yes, it should be possible to change the filter multiple times. You'd
have to call OGRLayer::ResetReading() each time you change the spatial
filter and then you can use GetNextFeature() calls to read the features
that match the new filter.

Daniel
--
Daniel Morissette
http://www.mapgears.com/

#1089 From: "lentilek" <lentilek@...>
Date: Fri Jun 9, 2006 1:07 pm
Subject: MID/MIF to TAB wrong source data or bug?!
lentilek
Send Email Send Email
 
Hi,
I have mid/mif files which contains one region and over 40000
polygons. After mif tab2tab conversion the result tab file is blank
under mapinfo. The same mif file converted by mapinfo is properly
displayed. Could someone have any ideas why? I could provide source
mif/mid files of course.
Mif header:

VERSION 450
Charset "WindowsLatin1"
Delimiter ","
CoordSys Earth Projection 1,104
COLUMNS 4
LEGEND Char(50)
THRESHOLD Float
COLOR Char(20)
PREDICTION_NAME Char(50)
DATA
Region 40554

Regards
Mike

#1090 From: Daniel Morissette <dmorissette@...>
Date: Thu Jun 15, 2006 7:58 pm
Subject: Re: MID/MIF to TAB wrong source data or bug?!
dan_morissette
Send Email Send Email
 
Mike,

In older versions of MapInfo files on which MITAB is based, the REGION
object could contain only a maximum of 32k segments, this would explain
the problems that you encountered.

Someone wrote to this list a few months ago that this limit may have
been increased in MapInfo V8, see the following bug report:
http://bugzilla.maptools.org/show_bug.cgi?id=1496

If you (or someone else) can provide a sample MIF/MID with a REGION with
more than 32k segments and the corresponding TAB dataset imported by
MapInfo then we could use that to figure the new objects structure and
add support for them.

Daniel


lentilek wrote:
>
>
> Hi,
> I have mid/mif files which contains one region and over 40000
> polygons. After mif tab2tab conversion the result tab file is blank
> under mapinfo. The same mif file converted by mapinfo is properly
> displayed. Could someone have any ideas why? I could provide source
> mif/mid files of course.
> Mif header:
>
> VERSION 450
> Charset "WindowsLatin1"
> Delimiter ","
> CoordSys Earth Projection 1,104
> COLUMNS 4
> LEGEND Char(50)
> THRESHOLD Float
> COLOR Char(20)
> PREDICTION_NAME Char(50)
> DATA
> Region 40554
>
> Regards
> Mike
>

--
Daniel Morissette
http://www.mapgears.com/

#1091 From: "abetlehem" <andrew@...>
Date: Wed Jun 28, 2006 2:49 am
Subject: Fixed bug with bounds in tab2tab
abetlehem
Send Email Send Email
 
Hi All,

I've just noticed a bug in the use of bounds in the tab2tab program.
Currently any file with a bounds set will not convert to a file with
the same bounds set - it will just use the default.

To fix this, the tab2tab file needs to be changed to:

     OGRSpatialReference *poSR;

     poSR = poSrcFile->GetSpatialRef();
     if( poSR != NULL )
     {
         poDstFile->SetSpatialRef( poSR );
     }

     //  Set bounds, removed from before SRS setting
     if (poSrcFile->GetBounds(dXMin, dYMin, dXMax, dYMax) == 0)
         poDstFile->SetBounds(dXMin, dYMin, dXMax, dYMax);

i.e. the set bounds should be performed after the SRS is set.

To test bounds in MapInfo, use the Tool Manager addin, 'CordSys
Bounds Checker'.

Does this sound correct?

cheers,

Andrew

#1092 From: Daniel Morissette <dmorissette@...>
Date: Wed Jun 28, 2006 10:25 am
Subject: Re: Fixed bug with bounds in tab2tab
dan_morissette
Send Email Send Email
 
Andrew,

Good catch. SetSpatialRef() does a default bounds lookup so we need to
call it before setting bounds from source dataset.

I have fixed this in CVS. Will be in the next release (likely 1.5.1).

Daniel

abetlehem wrote:
>
>
> Hi All,
>
> I've just noticed a bug in the use of bounds in the tab2tab program.
> Currently any file with a bounds set will not convert to a file with
> the same bounds set - it will just use the default.
>
> To fix this, the tab2tab file needs to be changed to:
>
> OGRSpatialReference *poSR;
>
> poSR = poSrcFile->GetSpatialRef();
> if( poSR != NULL )
> {
> poDstFile->SetSpatialRef( poSR );
> }
>
> // Set bounds, removed from before SRS setting
> if (poSrcFile->GetBounds(dXMin, dYMin, dXMax, dYMax) == 0)
> poDstFile->SetBounds(dXMin, dYMin, dXMax, dYMax);
>
> i.e. the set bounds should be performed after the SRS is set.
>
> To test bounds in MapInfo, use the Tool Manager addin, 'CordSys
> Bounds Checker'.
>
> Does this sound correct?
>
> cheers,
>
> Andrew
>

--
Daniel Morissette
http://www.mapgears.com/

#1093 From: "Ned Harding" <NHARDING@...>
Date: Thu Jun 29, 2006 5:52 pm
Subject: Major bug in mitab_feature.cpp
NHARDING@...
Send Email Send Email
 
We recently upgraded to the latest version of MiTab (via GDAL) and it
broke Multi_Polyline output for TAB files.  I have traced it to a recent
change in MiTab_Feature.cpp about line 2100.  Previously it did not
check the m_nMapInfoType and now it does, but it appears to check for
the wrong types.  The assert 10 lines down seems to confirm this because
it could never be true if the if statement coming in to this block.
Change the if block to test for the condition in the assert seems to fix
the problem.  See the diff below (revision #'s are our SVN).

Ned.

Index: mitab_feature.cpp
===================================================================
--- mitab_feature.cpp (revision 12658)
+++ mitab_feature.cpp (working copy)
@@ -2110,8 +2110,10 @@
          poPLineHdr->m_nPenId = m_nPenDefIndex;      // Pen index

      }
-    else if ((m_nMapInfoType == TAB_GEOM_PLINE ||
-              m_nMapInfoType == TAB_GEOM_PLINE_C ) &&
+    else if ((m_nMapInfoType == TAB_GEOM_MULTIPLINE ||
+                  m_nMapInfoType == TAB_GEOM_MULTIPLINE_C ||
+                  m_nMapInfoType == TAB_GEOM_V450_MULTIPLINE ||
+                  m_nMapInfoType == TAB_GEOM_V450_MULTIPLINE_C ) &&
               poGeom && (wkbFlatten(poGeom->getGeometryType()) ==
wkbMultiLineString ||
                          wkbFlatten(poGeom->getGeometryType()) ==
wkbLineString) )
      {

#1094 From: Daniel Morissette <dmorissette@...>
Date: Thu Jun 29, 2006 7:54 pm
Subject: Re: Major bug in mitab_feature.cpp
dan_morissette
Send Email Send Email
 
Ned Harding wrote:
>
>
> We recently upgraded to the latest version of MiTab (via GDAL) and it
> broke Multi_Polyline output for TAB files. I have traced it to a recent
> change in MiTab_Feature.cpp about line 2100. Previously it did not
> check the m_nMapInfoType and now it does, but it appears to check for
> the wrong types. The assert 10 lines down seems to confirm this because
> it could never be true if the if statement coming in to this block.
> Change the if block to test for the condition in the assert seems to fix
> the problem. See the diff below (revision #'s are our SVN).
>

This issue was reported in bug 1466 by Uffe K. and I verified that your
patch fixes it with his test dataset. Thanks guys! I have applied the
patch in CVS and should probably package a new release soon with at
least this and the #idfef MITAB_AFFINE_PARAMS fix. Both issues were
introduced in 1.5.0.

http://bugzilla.maptools.org/show_bug.cgi?id=1466

Daniel
--
Daniel Morissette
http://www.mapgears.com/

#1095 From: "stu_j.rm" <stu_j@...>
Date: Sat Jul 1, 2006 11:29 pm
Subject: Convert CSV to TAB
stu_j.rm
Send Email Send Email
 
Greetings List

I'm looking for a utility which will convert a CSV file containing
eastings and northings into a MapInfo TAB file, where those
coordinates have been converted to point objects. I don't know if such
a thing exists, but wonder whether MITAB will do the job.

Any help is greatly appreciated.

Regards
Stuart Jones

#1096 From: "stu_j.rm" <stu_j@...>
Date: Tue Jul 4, 2006 8:09 am
Subject: Re: Convert CSV to TAB
stu_j.rm
Send Email Send Email
 
OK, so I read around the subject a bit and realised that the MIF/MID
combination is perfect, as they're an ASCII representation of the
MapInfo data.

I can now take my XML source, create the MIF/MID with XSLT, and feed
the results into TAB2TAB to generate the MapInfo TAB file.

Hope this helps someone else...

Cheers
Stuart


--- In mitab@yahoogroups.com, "stu_j.rm" <stu_j@...> wrote:
>
> Greetings List
>
> I'm looking for a utility which will convert a CSV file containing
> eastings and northings into a MapInfo TAB file, where those
> coordinates have been converted to point objects. I don't know if such
> a thing exists, but wonder whether MITAB will do the job.
>
> Any help is greatly appreciated.
>
> Regards
> Stuart Jones
>

#1097 From: Daniel Morissette <dmorissette@...>
Date: Tue Jul 4, 2006 3:53 pm
Subject: Re: Re: Convert CSV to TAB
dan_morissette
Send Email Send Email
 
Another option, if you really had to use .CSV as input would have been
to use OGR's ogr2ogr utility (http://www.gdal.org/ogr/ogr2ogr.html), but
that would be a bit more complicated than converting mif/mid using tab2tab:

1- Create a OGR Virtual DataSource to make your CSV file readable by OGR
as a point layer, see http://www.gdal.org/ogr/drv_vrt.html

e.g. create a worms.vrt file like this:

<OGRVRTDataSource>
      <OGRVRTLayer name="worms">
          <SrcDataSource>worms.csv</SrcDataSource>
  	 <SrcLayer>worms</SrcLayer>
	 <GeometryType>wkbPoint</GeometryType>
          <LayerSRS>WGS84</LayerSRS>
	 <GeometryField encoding="PointFromColumns" x="easting" y="northing"/>
      </OGRVRTLayer>
</OGRVRTDataSource>


2- Use ogr2ogr to convert to .TAB, see http://www.gdal.org/ogr/ogr2ogr.html

e.g.

    ogr2ogr -f "MapInfo File" output.tab worms.vrt worms


I didn't test the examples above, just wrote them off the top of my
head, but hopefully that gives you the idea.

As I wrote above, going MIF/MID -> TAB using tab2tab may be simpler if
you can do that.

Daniel


stu_j.rm wrote:
>
>
> OK, so I read around the subject a bit and realised that the MIF/MID
> combination is perfect, as they're an ASCII representation of the
> MapInfo data.
>
> I can now take my XML source, create the MIF/MID with XSLT, and feed
> the results into TAB2TAB to generate the MapInfo TAB file.
>
> Hope this helps someone else...
>
> Cheers
> Stuart
>
> --- In mitab@yahoogroups.com <mailto:mitab%40yahoogroups.com>,
> "stu_j.rm" <stu_j@...> wrote:
>  >
>  > Greetings List
>  >
>  > I'm looking for a utility which will convert a CSV file containing
>  > eastings and northings into a MapInfo TAB file, where those
>  > coordinates have been converted to point objects. I don't know if such
>  > a thing exists, but wonder whether MITAB will do the job.
>  >
>  > Any help is greatly appreciated.
>  >
>  > Regards
>  > Stuart Jones
>  >
>
>


--
Daniel Morissette
http://www.mapgears.com/

#1098 From: "Thomas" <tsteberi@...>
Date: Wed Jul 12, 2006 12:36 pm
Subject: prime meridian taken into account only if datum=9999
tsteberi
Send Email Send Email
 
Hi,
I want to use proj.4 + mitab to reproject points from WGS84 to French
Lambert II (ie from "CoordSys Earth Projection 1, 104" to "Coordsys
Earth Projection 3, 1002, \"m\", 0, 46.8, 45.898918964419,
47.696014502038, 600000, 2200000").
I think a little correction is needed in mitab to make it working
well: in file "mitab_coordsys.cpp", at line 834, the test "if( nDatum
== 9999 )" is not correct. Indeed, the code just after must always be
executed: in my case, the datum id is 1002 and we have a non-zero
prime merdian (Paris).
What do you think about this correction?
Thank you for your work,
Reagrds
Thomas

PS: If you want to test it, don't forget to define
"WKT_LONGITUDE_RELATIVE_TO_PM" in ogrspatialreference.cpp too.

#1099 From: "andrew_r_blake" <andrew.blake@...>
Date: Fri Jul 21, 2006 3:28 pm
Subject: Performance bug in MITAB generated spatial indexes
andrew_r_blake
Send Email Send Email
 
Hi,

I have noticed that the spatial index performance of large MITAB generated files is much slower than that of an index generated by MapInfo and I wondered whether this is a known issue and whether there is a fix for the problem ?

A bit of background. I have a MapInfo dataset which contains about 110,000 polygons representing building outlines of New York and I need a quick way of querying which building is under the mouse cursor.

For a repeatible test, I've used OGRINFO.exe to perform the spatial query, but the same performance is observed when using the C++ MITAB library directly. The average time for 10 runs of this query with the MITab generated file is 3.6 seconds. However, the MapInfo generated file, performance is much better at 0.2s.

The command line I used was:

ogrinfo.exe -spat 588171 4515483 588171 4515483 ny.tab ny

I'm not sure whether this is a contributing factor, but the file sizes of the MITab and MapInfo generated vectors are different. The original source data was MIF/MID and converted it to TAB using TAB2TAB. This generated the following files:

 Directory of J:\MapInfoData

19/07/2006  20:06         6,737,350 NY.dat
19/07/2006  20:06           427,760 NY.id
19/07/2006  20:06        20,071,936 NY.ind
19/07/2006  20:06        13,559,808 NY.map
19/07/2006  20:06               190 NY.tab


If I then load those files into MapInfo and save a copy of the table as NY2, the corresponding file sizes become:

 Directory of J:\MapInfoData

19/07/2006  20:20         6,737,350 NY2.DAT
19/07/2006  20:20           427,760 NY2.ID
19/07/2006  20:20        15,512,064 NY2.IND
19/07/2006  20:20        16,565,760 NY2.MAP
19/07/2006  20:20               202 NY2.TAB


Using TAB2TAB again on these NY2 files, the filesizes revert back to those of the NY1 list - implying that MapInfo and MITab consider the contents to be the same, although they express the contents of MAP and IND files differently.

It would appear MITab is quite happy to quickly use the spatial indexes generated by MapInfo, but is unable to generate optimal spatial indexes itself.

These tests were conducted with MITAB 1.3 and the latest 1.5.0 release. I've also obtained the latest GDAL distribution which has a much newer OGL library and built a version of TAB2TAB but the performance was not improved.

I'd really appreciate comments from anyone who has observed similar spatial index performance issues.

Is the problem likely to be in MITab or OGR ?


Many thanks,

Andrew



#1100 From: Daniel Morissette <dmorissette@...>
Date: Fri Jul 21, 2006 7:47 pm
Subject: Re: Performance bug in MITAB generated spatial indexes
dan_morissette
Send Email Send Email
 
andrew_r_blake wrote:
>
> It would appear MITab is quite happy to quickly use the spatial indexes
> generated by MapInfo, but is unable to generate optimal spatial indexes
> itself.
>

You got it there: MITAB can read the spatial index no problem, but the
current implementation doesn't always generate a balanced spatial index
(tree)... actually it doesn't contain any smarts to keep the tree
balanced, which results in the behaviors that you noticed. There may
even be some TODO comments in the code to that effect.

>
> Is the problem likely to be in MITab or OGR ?
>

It's in MITAB.

Daniel
--
Daniel Morissette
http://www.mapgears.com/

#1101 From: "ras_elased_borealis" <ras_elased_borealis@...>
Date: Tue Jul 25, 2006 9:31 am
Subject: Failed writing geometry
ras_elased_b...
Send Email Send Email
 
Using tab2tab (1.5.0_win32 on XP SP2) I got the following errors trying
to convert from MIF to TAB :

"ERROR 7: TABPolyline: Object contains an invalid Geometry!
ERROR 3: Failed writing geometry for feature id 1 in
e:\temp\T_LINE026_001.TAB
ERROR 3: Failed writing geometry for feature id 2 in
e:\temp\T_LINE026_001.TAB
ERROR 3: Failed writing geometry for feature id 3 in
e:\temp\T_LINE026_001.TAB
[...]
"
One error for each feature of the file.

The MIF/MID file is generated from a text file, so some syntax may be
wrong, however the MapInfo import runs fine.

See the files at
http://dl-3.free.fr/52616e646f6d49569790291dfebf0ac2f2b003a36625831cb69e95398835\
0ec6/mif.zip

#1102 From: Daniel Morissette <dmorissette@...>
Date: Tue Jul 25, 2006 12:43 pm
Subject: Re: Failed writing geometry
dan_morissette
Send Email Send Email
 
ras_elased_borealis wrote:
>
>
> Using tab2tab (1.5.0_win32 on XP SP2) I got the following errors trying
> to convert from MIF to TAB :
>
> "ERROR 7: TABPolyline: Object contains an invalid Geometry!
> ERROR 3: Failed writing geometry for feature id 1 in
> e:\temp\T_LINE026_001.TAB
> ERROR 3: Failed writing geometry for feature id 2 in
> e:\temp\T_LINE026_001.TAB
> ERROR 3: Failed writing geometry for feature id 3 in
> e:\temp\T_LINE026_001.TAB
> [...]
> "
> One error for each feature of the file.
>
> The MIF/MID file is generated from a text file, so some syntax may be
> wrong, however the MapInfo import runs fine.
>
> See the files at
>
http://dl-3.free.fr/52616e646f6d49569790291dfebf0ac2f2b003a36625831cb69e95398835\
0ec6/mif.zip



This was fixed in bug 1466 and will be part of the next release (v1.5.1,
hopefully today if I can find the time). I verified that the sample
files work with the fix. If you can't wait for the new release then you
can apply the patch from bug 1466 to your local source:

http://bugzilla.maptools.org/show_bug.cgi?id=1466

Daniel
--
Daniel Morissette
http://www.mapgears.com/

#1103 From: "ras_elased_borealis" <ras_elased_borealis@...>
Date: Tue Jul 25, 2006 1:32 pm
Subject: Re: Failed writing geometry
ras_elased_b...
Send Email Send Email
 
It seems it's a known bug :
http://bugzilla.maptools.org/show_bug.cgi?id=1531

--- In mitab@yahoogroups.com, "ras_elased_borealis"
<ras_elased_borealis@...> wrote:
>
> Using tab2tab (1.5.0_win32 on XP SP2) I got the following errors trying
> to convert from MIF to TAB :
>
> "ERROR 7: TABPolyline: Object contains an invalid Geometry!
> ERROR 3: Failed writing geometry for feature id 1 in
> e:\temp\T_LINE026_001.TAB
> ERROR 3: Failed writing geometry for feature id 2 in
> e:\temp\T_LINE026_001.TAB
> ERROR 3: Failed writing geometry for feature id 3 in
> e:\temp\T_LINE026_001.TAB
> [...]
> "
> One error for each feature of the file.
>
> The MIF/MID file is generated from a text file, so some syntax may be
> wrong, however the MapInfo import runs fine.
>
> See the files at
>
http://dl-3.free.fr/52616e646f6d49569790291dfebf0ac2f2b003a36625831cb69e95398835\
0ec6/mif.zip
>

#1104 From: Daniel Morissette <dmorissette@...>
Date: Tue Jul 25, 2006 2:40 pm
Subject: MITAB 1.5.1 released
dan_morissette
Send Email Send Email
 
MITAB 1.5.1 has just been released and posted to the website at
http://mitab.maptools.org/

This new release fixes a few critical issues that were introduced by new
features in 1.5.0. Users of MITAB 1.5.0 are strongly encouraged to
upgrade to 1.5.1.

The complete list of fixes since 1.5.0 is included below.

Daniel
--
Daniel Morissette
http://www.mapgears.com/


Version 1.5.1 (2006-07-25)
--------------------------

- Fixed initialization of MBR of TABCollection members (bug 1520)

- Added mapping for datum name "North_American_Datum_1927".

- Fixed problem with uninitialized affine parameters written to .MAP
header,
    resulting in files not readable in MapInfo, introduced by bug 1155 in
    MITAB 1.5.0 (bug 1254, 1319)

- Fixed problem writing PLINE MULTIPLE to TAB format introduced in
    MITAB 1.5.0 (bug 1466).

- tab2tab: Set dataset bounds only after setting spatialref to prevent
    default coordsys bounds from taking precedence when bounds are
    available in source dataset (bug 1511)

- Coordsys false easting and northing are in the units of the coordsys, not
    necessarily meters.  Adjusted mitab_coordsys.cpp to reflect this.
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1113

- Similar problem in mitab_spatialref.cpp for TAB files also fixed.
    http://bugzilla.remotesensing.org/show_bug.cgi?id=1113

#1105 From: Ras Elased Borealis <ras_elased_borealis@...>
Date: Tue Jul 25, 2006 6:03 pm
Subject: Re: Failed writing geometry
ras_elased_b...
Send Email Send Email
 
Thanks.
That was a quick answer and a quick fix ! congrats !

--- Daniel Morissette <dmorissette@...>
escreveu:

> ras_elased_borealis wrote:
> >
> >
> > Using tab2tab (1.5.0_win32 on XP SP2) I got the
> following errors trying
> > to convert from MIF to TAB :
> >
> > "ERROR 7: TABPolyline: Object contains an invalid
> Geometry!
> > ERROR 3: Failed writing geometry for feature id 1
> in
> > e:\temp\T_LINE026_001.TAB
> > ERROR 3: Failed writing geometry for feature id 2
> in
> > e:\temp\T_LINE026_001.TAB
> > ERROR 3: Failed writing geometry for feature id 3
> in
> > e:\temp\T_LINE026_001.TAB
> > [...]
> > "
> > One error for each feature of the file.
> >
> > The MIF/MID file is generated from a text file, so
> some syntax may be
> > wrong, however the MapInfo import runs fine.
> >
> > See the files at
> >
>
http://dl-3.free.fr/52616e646f6d49569790291dfebf0ac2f2b003a36625831cb69e95398835\
0ec6/mif.zip
>
>
>
>
> This was fixed in bug 1466 and will be part of the
> next release (v1.5.1,
> hopefully today if I can find the time). I verified
> that the sample
> files work with the fix. If you can't wait for the
> new release then you
> can apply the patch from bug 1466 to your local
> source:
>
> http://bugzilla.maptools.org/show_bug.cgi?id=1466
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
>
>
>
>




_______________________________________________________
O Yahoo! está de cara nova. Venha conferir!
http://br.yahoo.com/preview

Messages 1076 - 1105 of 1438   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help