Bug report #1527

Mapserver exports layer with wrong type

Added by oz123 - about 15 years ago. Updated over 14 years ago.

Status:Closed
Priority:Low
Assignee:Tim Sutton
Category:Project Loading/Saving
Affected QGIS version: Regression?:No
Operating System:Debian Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:11587

Description

Hi,
I tried exporting a qgis project with a few vector layer to mapserver file. The result is pretty impressive but something unexpected happened: All POLYGON layers are exported as POINT TYPE layers.

I looked at the code for ms_export.py and from what what I see I think the method lyr.getAttribute does not return the right type, so they all become POINT types.

I tried looking into lyr.getAttribute, but couldn't find where it is. I hope this is not just a false bug, and I hope I can help solving it, if someone directs me a bit to the right function lyr.getAttribute (if it's written in python i can handle it better, but c++ will be fine too.)

Thanks, Oz.

sinbra2.qgs (7.87 KB) oz123 -, 2009-02-05 12:03 PM

History

#1 Updated by Gary Sherman about 15 years ago

It would be helpful if you can attach your QGIS project file.

#2 Updated by Maciej Sieczka - about 15 years ago

Replying to [comment:1 gsherman]:

It would be helpful if you can attach your QGIS project file.

Just try with any project file containg a polygon or line shapefile.

#3 Updated by oz123 - about 15 years ago

ok I attached my project file.
Sorry for the late reply,
it has all type of layers: point, line, polygon and raster.

#4 Updated by oz123 - about 15 years ago

Soory, that is a file with only two polygon layers.
The funny thing is that they are displayed on my screen as polygons but when I look in the specs of the file the are point type .... so that's obviously wrong ...

#5 Updated by Gary Sherman about 15 years ago

This is a bug in the qgis project writing code, not the mapserver export. The geometry type is always set to Point.

Projects saved on OS X result in same issue.

#6 Updated by Tim Sutton about 15 years ago

  • Status changed from Open to In Progress

#7 Updated by Tim Sutton about 15 years ago

  • Status changed from In Progress to Closed
  • Resolution set to fixed

Hi

I have fixed it in (stable branch) and b5d3a156 (SVN r10116) (trunk).

Regards

Tim

#8 Updated by Anonymous over 14 years ago

Milestone Version 1.0.1 deleted

Also available in: Atom PDF