Opened 14 years ago

Last modified 13 years ago

#2733 new bug

fTools Add geometry column fails to add XCOORD if source is GPX file or PostGIS Layer

Reported by: marisn Owned by: cfarmer
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: fTools Version: Trunk
Keywords: ftools Cc: horst.duester@…
Must Fix for Release: Yes Platform: All
Platform Version: Awaiting user input: no

Description

Plugins -> GPS -> GPS tools -> load waypoint GPX file -> fTools -> Geometry tools -> Export/add geometry column -> Choose GPX waypoint layer -> Choose any output name -> OK -> Open attribute table: only YCOORD is present, XCOORD is missing.

Saving GPX as shapefile and then running fTools add geometry column works just fine for WGS84 and projected files.

QGIS 1.4.0 and trunk r13529 fTools 0.5.10

Change History (5)

comment:1 by lutra, 14 years ago

Component: VectorsPython plugins and bindings
Owner: changed from nobody to cfarmer

comment:2 by lutra, 14 years ago

Platform: GentooAll

Hi,

I noticed that if you open the GPX file trough the standard "add vector" interface things are pretty different: the attribute table is different and the "Export/add geometry column" works fine. So it should not be a ftools problem after all, but a problem of QGIS GPS tools toolbox.

comment:3 by lutra, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

this should not be a ftools problem. Please leave further feedback and change the summary if you confirm my observations.

comment:4 by hdus, 13 years ago

Cc: horst.duester@… added
Must Fix for Release: NoYes
Summary: fTools Add geometry column fails to add XCOORD if source is GPX filefTools Add geometry column fails to add XCOORD if source is GPX file or PostGIS Layer

I found the same behaviour with PostGIS layers as well. The bug depends on the position of the geometry column in the column-list.

With the following POINT table-definition, geometry column at the beginning of the columns list:

CREATE TABLE test1
(
  id serial NOT NULL,
  wkb_geometry geometry,
  feld1 text,
  feld2 text,
  feld3 integer,
  CONSTRAINT test1_pkey PRIMARY KEY (id)
)

only the YCOORD column will be exported.

With the following POINT table-definition, with geometry at the end of the columns list:

CREATE TABLE test1
(
  id serial NOT NULL,
  feld1 text,
  feld2 text,
  feld3 integer,
  wkb_geometry geometry
  CONSTRAINT test1_pkey PRIMARY KEY (id)
)

all columns XCOORD and YCOORD will be exported fine.

comment:5 by borysiasty, 13 years ago

Component: Python plugins and bindingsfTools
Note: See TracTickets for help on using tickets.