Ticket #532 (new defect)

Opened 5 years ago

Last modified 5 years ago

[OGR] STYLEITEM AUTO does not support angle from OGR feature style

Reported by: jlacroix Assigned to: jlacroix
Priority: high Milestone:
Component: OGR Support Version: 4.1
Severity: normal Keywords:
Cc:

Description

The SYMBOL in OGRFeature contains an angle. However this angle is not used
inside mapserver. The correct behavior is to set the angle in the mapfile
symbol. I will modify mapogr.cpp to accept angle.

Yvain Ballini has provided a test case for this. I will attach it.

Here's the output of ogrinfo on his layer and his layer:

> Layer name: arrow
> Geometry: Point
> Feature Count: 267349
> Extent: (6.682870, 36.681040) - (18.495850, 46.895265) Layer SRS WKT:
> GEOGCS["unnamed",
>     DATUM["WGS_1984",
>         SPHEROID["WGS 84",6378137,298.257223563],
>         TOWGS84[0,0,0,0,0,0,0]],
>     PRIMEM["Greenwich",0],
>     UNIT["degree",0.0174532925199433]]
> LABEL: String (70.0)
> OGRFeature(arrow):1
>   LABEL (String) =
>   Style = SYMBOL(a:322,c:#4144ae,s:13pt,id:"mapinfo-sym-111.ogr-sym-1")
>   POINT (8.85458500 45.96559000)
> 
> OGRFeature(arrow):2
>   LABEL (String) =
>   Style = SYMBOL(a:322,c:#4144ae,s:13pt,id:"mapinfo-sym-111.ogr-sym-1")
>   POINT (8.85458500 45.96559000)
> ........
> 
> I define my arrow layer like that:
> LAYER
>   NAME freccie_navtech
>   PROJECTION
>   "proj=longlat"
>   "ellps=intl"
>   "no_defs"
>   END
>   STATUS OFF
>   DATA arrow#chiave_in_piazzale_segesta#arrow#vie3_polyline
>   CONNECTIONTYPE OGR
>   CONNECTION
> "c:\mapserver\itasca\data\arrow.tab"#chiave_in_piazzale_segesta.tab"#a
> rr
> ow.tab"
>   STYLEITEM "AUTO"
>   TYPE point
>    CLASS
>     #STYLE
>     #  SYMBOL arrow
>     #  size 20
>       COLOR 88 88 245
>       #ANTIALIAS TRUE
>     #END
>   END
> END

Attachments

small_arrow.zip (4.0 kB) - added by jlacroix on 01/05/04 14:34:04.
Yvain Ballini data
test_demo.map (2.7 kB) - added by jlacroix on 01/05/04 14:35:10.
Yvain Ballini mapfile

Change History

01/05/04 14:32:17 changed by jlacroix

  • owner changed from mapserverbugs to lacroix@dmsolutions.ca.
  • cc set to mapserver-bugs@dmsolutions.ca.

01/05/04 14:34:04 changed by jlacroix

  • attachment small_arrow.zip added.

Yvain Ballini data

01/05/04 14:35:10 changed by jlacroix

  • attachment test_demo.map added.

Yvain Ballini mapfile

01/05/04 14:45:51 changed by dmorissette

Note: don't forget to also reset the angle value in resetClassStyle() in mapfile.c

01/05/04 16:02:01 changed by jlacroix

  • dependson set to 533.
The angle is not supported for symbol. I created a new bug for this (bug 533).
The angle should be implemented before fixing this.