[UMN_MAPSERVER-USERS] Empty map with MapInfo files (Mif/Mid) and OGR

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[UMN_MAPSERVER-USERS] Empty map with MapInfo files (Mif/Mid) and OGR

Selim Hernandez
Hello,

I am a beginner with Mapserver.

I set up Ms4w succesfully.
The workshop demo is working fine
I manage to begin the tutorial.

Now I'm trying to use MapInfo exchange files (mif/mid files) with MapInfo,
using OGR.

Since I have no error message, I can say that OGR and mapserver find my mif
file. But I still have an empty map.

Here are my two files :



-->test2.map :

MAP
  IMAGETYPE      PNG
  EXTENT         -97.5 41.619778 -82.122902 49.38562 # Geographic
  SIZE           400 300
  SHAPEPATH      "data"
  IMAGECOLOR     255 255 255

  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
    NAME         states
           CONNECTIONTYPE OGR
    CONNECTION "test.mif"
           DATA "test"

    STATUS       DEFAULT
    TYPE         POINT

    CLASS
      COLOR        0 0 0
      OUTLINECOLOR 0 0 0
    END
  END # States polygon layer ends here
  # End of LAYER DEFINITIONS -------------------------------

END # end of map file/object


---->and my test.mif file:

VERSION 300
DELIMITER ","

COLUMNS 0
DATA
POINT 45 -85
Reply | Threaded
Open this post in threaded view
|

[UMN_MAPSERVER-USERS] GML MultiLineString - missing space

François-Xavier PRUNAYRE
Hi list, I have no space between coordinates in gml:MultiLineString
geometry.
Like ...
 <gml:MultiLineString srsName="EPSG:4326">
        <gml:LineString>
        <gml:coordinates>
       
1.573795,48.756269-1.573767,48.756279-1.573621,48.756415-1.573190,48.757014-
1.572663,48.758156-1.572388,48.759020-1.572269,48.760149-1.571406,48.763876-
1.571331,48.764688-1.571195,48.765413-1.570923,48.767222-1.570576,48.768943-
1.570443,48.768992-1.570467,48.769126-1.570198,48.771880-1.570333,48.775304-
1.570319,48.776924-1.570258,48.777736-1.570149,48.778100-1.570132,48.778775-
1.569944,48.779906
        </gml:coordinates>
        </gml:LineString>

It should be ...
<gml:MultiLineString srsName="EPSG:4326">
        <gml:LineString>
        <gml:coordinates>
        -1.573795,48.756269 -1.573767,48.756279 -1.573621,48.756415
-1.573190,48.757014 -1.572663,48.758156 -1.572388,48.759020
-1.572269,48.760149 -1.571406,48.763876 -1.571331,48.764688
-1.571195,48.765413 -1.570923,48.767222 -1.570576,48.768943
-1.570443,48.768992 -1.570467,48.769126 -1.570198,48.771880
-1.570333,48.775304 -1.570319,48.776924 -1.570258,48.777736
-1.570149,48.778100 -1.570132,48.778775 -1.569944,48.779906
        </gml:coordinates>
        </gml:LineString>



In 4.6.0, file mapgml.c, line 310 : "%f,%f" should be replace by "%f,%f "

        msIO_fprintf(stream, "%s    <gml:coordinates>", tab);
        for(i=0; i<shape->line[j].numpoints; i++)
          msIO_fprintf(stream, "%f,%f ", shape->line[j].point[i].x,
shape->line[j].point[i].y);
        msIO_fprintf(stream, "</gml:coordinates>\n");


Works for me.  

Francois


--
Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et prives. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.

Any data and information contained in this electronic mail is personal, confidential and secret. Any total or partial publication, use or distribution must be authorized.
Reply | Threaded
Open this post in threaded view
|

Re: [UMN_MAPSERVER-USERS] GML MultiLineString - missing space

Steve Lime
Thanks will add to 4.7 and 4.6 source trees shortly...

Steve

>>> François Prunayre <[hidden email]> 07/06/05 5:31 AM >>>
Hi list, I have no space between coordinates in gml:MultiLineString
geometry.
Like ...
 <gml:MultiLineString srsName="EPSG:4326">
        <gml:LineString>
        <gml:coordinates>
       
1.573795,48.756269-1.573767,48.756279-1.573621,48.756415-1.573190,48.757014-
1.572663,48.758156-1.572388,48.759020-1.572269,48.760149-1.571406,48.763876-
1.571331,48.764688-1.571195,48.765413-1.570923,48.767222-1.570576,48.768943-
1.570443,48.768992-1.570467,48.769126-1.570198,48.771880-1.570333,48.775304-
1.570319,48.776924-1.570258,48.777736-1.570149,48.778100-1.570132,48.778775-
1.569944,48.779906
        </gml:coordinates>
        </gml:LineString>

It should be ...
<gml:MultiLineString srsName="EPSG:4326">
        <gml:LineString>
        <gml:coordinates>
        -1.573795,48.756269 -1.573767,48.756279 -1.573621,48.756415
-1.573190,48.757014 -1.572663,48.758156 -1.572388,48.759020
-1.572269,48.760149 -1.571406,48.763876 -1.571331,48.764688
-1.571195,48.765413 -1.570923,48.767222 -1.570576,48.768943
-1.570443,48.768992 -1.570467,48.769126 -1.570198,48.771880
-1.570333,48.775304 -1.570319,48.776924 -1.570258,48.777736
-1.570149,48.778100 -1.570132,48.778775 -1.569944,48.779906
        </gml:coordinates>
        </gml:LineString>



In 4.6.0, file mapgml.c, line 310 : "%f,%f" should be replace by "%f,%f "

        msIO_fprintf(stream, "%s    <gml:coordinates>", tab);
        for(i=0; i<shape->line[j].numpoints; i++)
          msIO_fprintf(stream, "%f,%f ", shape->line[j].point[i].x,
shape->line[j].point[i].y);
        msIO_fprintf(stream, "</gml:coordinates>\n");


Works for me.  

Francois


--
Ce message a ete verifie par MailScanner pour des virus ou des polluriels et rien de suspect n'a ete trouve.

Les donnees et renseignements contenus dans ce message sont personnels, confidentiels et prives. Toute publication, utilisation ou diffusion, meme partielle, doit etre autorisee.

Any data and information contained in this electronic mail is personal, confidential and secret. Any total or partial publication, use or distribution must be authorized.
Reply | Threaded
Open this post in threaded view
|

Re: [UMN_MAPSERVER-USERS] Empty map with MapInfo files (Mif/Mid) and OGR

Selim Hernandez
In reply to this post by Selim Hernandez
Hello,

I found the answer by myself

Well the problem was not about the Mapinfo files but, as alleged in an
other message of this list, about the EXTENT and PROJECTION parameters in
the .map file that were wrong.


thanks