Retrieve extent value using OGR

Sébastien Didelet taf.seb.didelet at GMAIL.COM
Thu Oct 20 05:16:34 EDT 2005


It doesn't work too (got the same error) ... my .map file is the following :

#
# Start of map file
#
MAP
NAME Essai_zone
STATUS ON
SIZE 600 600
EXTENT 567955 2511748 579369 2521531
UNITS METERS
SHAPEPATH "/usr/CPSSites/CG60Intranet/carte/demo/data"
IMAGECOLOR 255 255 255

IMAGETYPE PNG

#
# Start of symbol definitions (we're only using a few)
#
SYMBOL
NAME 'circle'
TYPE ELLIPSE
POINTS 1 1 END
FILLED TRUE
END

SYMBOL
NAME 'star'
TYPE VECTOR
FILLED TRUE
POINTS
0 .375
.35 .375
.5 0
.65 .375
1 .375
.75 .625
.875 1
.5 .75
.125 1
.25 .625
END
END


#
# Start of layer definitions
#

LAYER
NAME "Essai_zone"
TYPE POLYGON
CONNECTIONTYPE OGR
CONNECTION "/usr/CPSSites/CG60Intranet/carte/demo/essai_zone.TAB"
STATUS ON

# This enables use of colors and styles from the source file.
STYLEITEM "AUTO"

# Define an empty class that will be filled at runtime from the color and
# styles read on each shape in the source file.
CLASS
NAME "essai_zone"
EXPRESSION ("essai_zone")
COLOR 23 0 220
LABEL
COLOR 0 0 0
FONT Arial
TYPE truetype
POSITION AUTO
PARTIALS FALSE
SIZE 10
BUFFER 5
#OUTLINECOLOR 255 255 255
END
END
END

END # Map File


all regards,
seb


2005/10/20, Bart van den Eijnden <BEN at syncera-itsolutions.nl>:
>
> Try:
>
> EXTENT 567955 2511748 579369 2521531
>
> If it does not work, post your complete MAP file and the request you are
> trying.
>
> Best regards,
> Bart
>
> Bart van den Eijnden
> Syncera IT Solutions
> Postbus 270
> 2600 AG DELFT
>
> tel.nr <http://tel.nr>.: 015-7512436
> email: BEN at Syncera-ITSolutions.nl
>
> >>> Sébastien Didelet <taf.seb.didelet at gmail.com> 20-10-2005 10:53 >>>
> When I use this EXTENT MapServer raise the following error :
>
> MapServerError: msyyparse(): Expression parser error. syntax error
> msyyparse(): Expression parser error. syntax error msyyparse(): Expression
> parser error. syntax error msyyparse(): Expression parser error. syntax
> error msyyparse(): Expression parser error. syntax error msyyparse():
> Expression parser error. syntax error msyyparse(): Expression parser
> error.
> syntax error msyyparse(): Expression parser error.syntax error (Also, an
> error occurred while attempting to render the standard error message.)
>
> do you know where is the mistake ?
>
>
>
> 2005/10/20, Bart van den Eijnden <BEN at syncera-itsolutions.nl>:
> >
> > You should use the following EXTENT in your MAP file then:
> >
> > MAP
> > ..
> > EXTENT 567955.024450 2511748.009226 579369.036331 2521531.038812
> > ..
> >
> > Best regards,
> > Bart
> >
> > Bart van den Eijnden
> > Syncera IT Solutions
> > Postbus 270
> > 2600 AG DELFT
> >
> > tel.nr <http://tel.nr> <http://tel.nr>.: 015-7512436
> > email: BEN at Syncera-ITSolutions.nl
> >
> > >>> Sébastien Didelet <taf.seb.didelet at GMAIL.COM> 20-10-2005 10:19 >>>
> > Hi,
> >
> > I tried to read a mapinfo file (.TAB) with mapserver using OGR library,
> > but
> > my question is how can I retrieve extent information that I have to
> write
> > in
> > the mapserver file (.map).
> > I've ever retrieve information about the mapinfo file with the ogrinfo
> > command which return me this :
> >
> > [root at siska demo]# ogrinfo -so essai_zone.TAB essai_zone |more
> > Had to open data source read-only.
> > INFO: Open of `essai_zone.TAB'
> > using driver `MapInfo File' successful.
> >
> > Layer name: essai_zone
> > Geometry: Polygon
> > Feature Count: 8
> > Extent: (567955.024450, 2511748.009226) - (579369.036331, 2521531.038812
> )
> > Layer SRS WKT:
> > ...
> >
> >
> > How I must fill the map file with this ?
> >
> >
> > All regards,
> > Seb
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20051020/0be5042b/attachment.html


More information about the mapserver-users mailing list