Re: [Qgis-user] QGIS 1.7.4 Wroclaw to Mapinfo: adivice please
Robert - How does the Coordsys clause in your new shape mif/mid file looks like ? (Open the new mif file in notepad, look at line 4) Is it the same as the Coordsys clause in the tab file for the jpg ? Regards Bo Victor Thomsen Aestas-GIS Denmark Den 09-10-2012 10:53, BTinternet skrev: As a non-expert newcomer to QGIS I would most grateful for the forum's advice. I have the task of taking TAB and JPG files created by a client in Mapinfo and drawing on them vector items using QGIS - and then returning the resulting SHP files (or SHP converted to Mapinfo MIF/MID files) to the client. When I do this, however, the client declares that, the CRS for the resulting SHP or MIF/MID files are non-existent or wrong. For example, Mapinfo TAB and associated JPG files was sent from my client. If I look at the TAB file in Notepad, I see that the data are as follows: !table !version 300 !charset WindowsLatin1 Definition Table File 03sw.jpg Type RASTER (512232,306415) (88,176) Label Pt 1, (517111,303237) (5484,3782) Label Pt 2, (512816.962,303710.679) (732,3234) Label Pt 3, (516970.093,306367.071) (5436,339) Label Pt 4, (513415.082,303400.549) (1389,3578) Label Pt 5 CoordSys Earth Projection 8, 79, m, -2, 49, 0.9996012717, 40, -10 Units m When I open the JPG in QGIS, I see that the CRS for the JPG is 'User Defined' and has the following definition: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=40 +y_0=-10 +ellps=airy +towgs84=375,-111,431,-0,-0,-0,0 +units=m +no_defs /*At this point, I'm not too sure whether or not QGIS has correctly interpreted the CRS for the Client's JPG. Can anyone help me on this please?*/ When I create a SHP vector layer on top of the JPG, I make sure that it has the same 'User Defined' CRS as above and save the SHP layer as Mapinfo-useable MIF and MID files. Looking at the MIF file in Notepad, I can see that the coordinates (shown bottom right in QGIS) of the vector file agree exactly with the original JPG raster. When the MIF/MID files are opened by my Client however, the files are unusable because the CRS is 'non-existent or wrong' *Can anyone point out where I'm going wrong please?* Best regards Robert Beasley ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Qgis 1.7.4 digitizing
On Mon, 2012-08-13 at 12:18 +0100, David wrote: I need to amend an existing shape file by making a line across an existing polygon. The user manual has a 'capture line' button but I can't find it on the toolbar. you cannot add lines into a polygon layer. If you need to split a polygon look for the split features tool in advanced digitizing toolbar. cheers -- Giovanni -- ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4 repositories
I'm not a ubuntu nut, but watching the list I offer three thoughts. 1. Lots of programmes (QGIS included) are having issues with the default desktop manager in recent Ubuntu releases. 2. Pick only one source for your .deb files. 3. One topic an email :) -ramon. On 28/06/2012, at 05:22 , Paul Shapley wrote: Hi All, I'm having numerous problems after upgrading to 1.8.0 on Ubuntu 12.04 so having to revert back to a fully working 1.7.4. Can anyone tell me the best way of installing all the relevant libraries. -- Paul J. Shapley ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4 crashes on Mac when opened
Update GDAL Complete. On Jun 10, 2012, at 2:59 PM, leanne_erica wrote: I'm completely new to the QGIS world, and definitely not a programmer. I couldn't find an answer to this question, but I apologize if this question has been asked and answered before. I have a Mac, running OS x 10.6.8. I downloaded QGIS 1.7.4 because I was having issues with the ECW plugin with v. 1.7. I can install 1.7.4 just fine, but when I try to open it, I get an error saying that I need to make sure this version is compatible with my Mac OS X and this: Process: QGIS [532] Path:/Applications/QGIS.app/Contents/MacOS/QGIS Identifier: org.qgis.qgis Version: ??? (???) Code Type: X86-64 (Native) Parent Process: launchd [99] Date/Time: 2012-06-10 12:54:32.235 -0700 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Interval Since Last Report: 933805 sec Crashes Since Last Report: 13 Per-App Crashes Since Last Report: 12 Anonymous UUID: 183F100F-83A7-4DBD-BF1B-9F6BB451016C Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0002, 0x Crashed Thread: 0 Dyld Error Message: Library not loaded: /Library/Frameworks/PROJ.framework/Versions/4/PROJ Referenced from: /Library/Frameworks/GDAL.framework/Versions/1.9/GDAL Reason: Incompatible library version: GDAL requires version 8.0.0 or later, but PROJ provides version 7.0.0 Binary Images: 0x7fff5fc0 - 0x7fff5fc3bdef dyld 132.1 (???) 486E6C61-1197-CC7C-2197-82CE505102D7 /usr/lib/dyld Model: MacBook7,1, BootROM MB71.0039.B0B, 2 processors, Intel Core 2 Duo, 2.4 GHz, 2 GB, SMC 1.60f5 Graphics: NVIDIA GeForce 320M, NVIDIA GeForce 320M, PCI, 256 MB Memory Module: global_name AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x93), Broadcom BCM43xx 1.0 (5.10.131.42.4) Bluetooth: Version 2.4.5f3, 2 service, 12 devices, 1 incoming serial ports Network Service: AirPort, AirPort, en1 Serial ATA Device: Hitachi HTS545025B9SA02, 232.89 GB Serial ATA Device: OPTIARC DVD RW AD-5970H USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0x0660 / 3 USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.), 0x8218, 0x0663 / 6 USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x0236, 0x0630 / 2 USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8507, 0x2460 / 2 Any help would be greatly appreciated. -- View this message in context: http://osgeo-org.1560.n6.nabble.com/QGIS-1-7-4-crashes-on-Mac-when-opened-tp4980246.html Sent from the Quantum GIS - User mailing list archive at Nabble.com. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user - William Kyngesburye kyngchaos*at*kyngchaos*dot*com http://www.kyngchaos.com/ I ache, therefore I am. Or in my case - I am, therefore I ache. - Marvin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
What a reactivity ! Thank you very much Lee. It is exactly the behaviour we need. Fabrice 2012/5/17 Lee Hachadoorian lee.hachadooria...@gmail.com Fabrice, I filed a bug report, and it turns out this has already been fixed in the development version. http://hub.qgis.org/issues/5608 --Lee On Wed, May 16, 2012 at 1:39 PM, Lee Hachadoorian lee.hachadooria...@gmail.com wrote: On 05/16/2012 02:41 AM, Bernhard Ströbl wrote: I agree, so if the user enters a value it should be passed to the database and not discarded. If it violates any database rules postgresql complains anyways. So this could be a bug then. BTW, I found I could *edit* the primary key field of a table with a key field typed as serial, but when I tried to add a new feature, any value entered manually generated a primary key violation. The column value in QGIS defaulted to nextval('sequence_name'::regclass), matching the column default in the table definition, but also generated a primary key violation. When I cleared the field completely, the row was added with the next available value from the sequence. not confirmed here (PostgreSQL 8.4, QGIS 1.7.4) primary key is integer with a nextval('sequence') default adding features the key field defaults to nextval('sequence') case 1) no change = nextval applied case 2) change value = nextval applied (no error, though) expected behaviour for case 2) would be to not apply the default shall we file a ticket for this? Bernhard OK, I have added a ticket for this behavior. Note that my previous complaint--any supplied value generates a primary key violation--was tested on Windows. Testing just now on Ubuntu, I observe same behavior as you and OP. I have filed the ticket accordingly. I want to retest on Windows, and then will amend ticket or file new bug report. I found a workaround : if I change the field type of the key from integer to bigint then everything works as attended... QGis doesnt tries anymore to give a value when we don't need it. But this is not very logical isn't it? Fabrice Fabrice, it seems that QGIS does allow you to edit an existing feature, so another workaround would be to add feature, save changes allowing Postgres to assign default value from sequence, then edit to change to the desired value. --Lee -- Lee Hachadoorian PhD, Earth Environmental Sciences (Geography) Research Associate, CUNY Center for Urban Research http://freecity.commons.gc.cuny.edu -- Lee Hachadoorian PhD, Earth Environmental Sciences (Geography) Research Associate, CUNY Center for Urban Research http://freecity.commons.gc.cuny.edu/ ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
Fabrice, I filed a bug report, and it turns out this has already been fixed in the development version. http://hub.qgis.org/issues/5608 --Lee On Wed, May 16, 2012 at 1:39 PM, Lee Hachadoorian lee.hachadooria...@gmail.com wrote: On 05/16/2012 02:41 AM, Bernhard Ströbl wrote: I agree, so if the user enters a value it should be passed to the database and not discarded. If it violates any database rules postgresql complains anyways. So this could be a bug then. BTW, I found I could *edit* the primary key field of a table with a key field typed as serial, but when I tried to add a new feature, any value entered manually generated a primary key violation. The column value in QGIS defaulted to nextval('sequence_name'::regclass), matching the column default in the table definition, but also generated a primary key violation. When I cleared the field completely, the row was added with the next available value from the sequence. not confirmed here (PostgreSQL 8.4, QGIS 1.7.4) primary key is integer with a nextval('sequence') default adding features the key field defaults to nextval('sequence') case 1) no change = nextval applied case 2) change value = nextval applied (no error, though) expected behaviour for case 2) would be to not apply the default shall we file a ticket for this? Bernhard OK, I have added a ticket for this behavior. Note that my previous complaint--any supplied value generates a primary key violation--was tested on Windows. Testing just now on Ubuntu, I observe same behavior as you and OP. I have filed the ticket accordingly. I want to retest on Windows, and then will amend ticket or file new bug report. I found a workaround : if I change the field type of the key from integer to bigint then everything works as attended... QGis doesnt tries anymore to give a value when we don't need it. But this is not very logical isn't it? Fabrice Fabrice, it seems that QGIS does allow you to edit an existing feature, so another workaround would be to add feature, save changes allowing Postgres to assign default value from sequence, then edit to change to the desired value. --Lee -- Lee Hachadoorian PhD, Earth Environmental Sciences (Geography) Research Associate, CUNY Center for Urban Research http://freecity.commons.gc.cuny.edu -- Lee Hachadoorian PhD, Earth Environmental Sciences (Geography) Research Associate, CUNY Center for Urban Research http://freecity.commons.gc.cuny.edu/ ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
Hi Lee, Am 15.05.2012 18:51, schrieb Lee Hachadoorian: On Tue, May 15, 2012 at 8:31 AM, Bernhard Ströbl bernhard.stro...@jena.de wrote: Am 15.05.2012 14:16, schrieb F T: I think the QGis code should not have this specific behaviour and should follow the standards. Is there a standard for this? From the db's point of view it is always the responsibility of the user to take care for proper primary keys. He can achieve this by a) using a sequence or b) using a software taking care of it (like QGIS) or c) error-prone manual entering. The use of an arbitrary key is commonplace, but not part of the SQL standard or required for normal form. Many table designs use meaningful primary keys, defined from a unique key within the data. To say that A key is just a technical field used to identify a dataset. It should not contain any information. is contentious. There is specifically *not* a standard in SQL. I think the 'standard Fabrice is referring to is this, that keys are not prohibited from being meaningful, and that the application should not just discard data that it allows you to enter and which is not in violation of your table design. I agree with the last sentence (see below). To explain my opinion: My users often try to pack a lot of information in the key field and I always advise them to not do so because if the information changes they have to change the key, too (normally they also want the information redundantly in a couple of fields anyways, so the table is not normalized then). From that experience _I_ would always advice to not put any information in the key. Thus the key can stay the same for the life cycle of a dataset. In my case, the values of the key come from an other application and I have to type these values to link the geometrical objects to the database informations. So this is a foreign key. I would recommend to use a dedicated field for this. It is not unreasonable to want a foreign key in a one-to-one relationship to match the primary key of the related table. ok, but it does not harm to add another field, either, because as I understood, the data referred to are not stored in the same database but come from an other application hence my recommendation. QGIS is not alone among GIS applications in requiring the use of a unique integer key in source data, and of course, it can't tell the difference between a key which is meaningless or meaningful in terms of data design and how the data is used elsewhere. It is a little odd that QGIS allows you to edit the field at all, since applications which use surrogate keys (arbitrary, meaningless integer values) usually also don't allow those keys to be edited. It's even more odd that QGIS allows you to edit the field but then discards a value which does not violate database rules. I agree, so if the user enters a value it should be passed to the database and not discarded. If it violates any database rules postgresql complains anyways. So this could be a bug then. BTW, I found I could *edit* the primary key field of a table with a key field typed as serial, but when I tried to add a new feature, any value entered manually generated a primary key violation. The column value in QGIS defaulted to nextval('sequence_name'::regclass), matching the column default in the table definition, but also generated a primary key violation. When I cleared the field completely, the row was added with the next available value from the sequence. not confirmed here (PostgreSQL 8.4, QGIS 1.7.4) primary key is integer with a nextval('sequence') default adding features the key field defaults to nextval('sequence') case 1) no change = nextval applied case 2) change value = nextval applied (no error, though) expected behaviour for case 2) would be to not apply the default shall we file a ticket for this? Bernhard --Lee Bernhard I found a workaround : if I change the field type of the key from integer to bigint then everything works as attended... QGis doesnt tries anymore to give a value when we don't need it. But this is not very logical isn't it? Fabrice 2012/5/15 Bernhard Ströblbernhard.stro...@jena.de mailto:bernhard.stro...@jena.de Hi Fabrice, I think this is the intended behaviour. If you leave it to the user to enter the primary key then the db might complain about non-unique keys. On the other hand why would you _want_ to assign a certain key? A key is just a technical field used to identify a dataset. It should not contain any information. On my db I have three tables (point, line, polygon) that insert into the same table representing a n:m relation. I use a sequence on the db and a trigger to assign the next sequence value on INSERT. Apart from that I have no need to interfere with my pk values and I am glad, that QGIS takes care of that. Bernhard Am 15.05.2012 13:07, schrieb F T: Hi all, We are not able to set explicitly
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
On 05/16/2012 02:41 AM, Bernhard Ströbl wrote: I agree, so if the user enters a value it should be passed to the database and not discarded. If it violates any database rules postgresql complains anyways. So this could be a bug then. BTW, I found I could *edit* the primary key field of a table with a key field typed as serial, but when I tried to add a new feature, any value entered manually generated a primary key violation. The column value in QGIS defaulted to nextval('sequence_name'::regclass), matching the column default in the table definition, but also generated a primary key violation. When I cleared the field completely, the row was added with the next available value from the sequence. not confirmed here (PostgreSQL 8.4, QGIS 1.7.4) primary key is integer with a nextval('sequence') default adding features the key field defaults to nextval('sequence') case 1) no change = nextval applied case 2) change value = nextval applied (no error, though) expected behaviour for case 2) would be to not apply the default shall we file a ticket for this? Bernhard OK, I have added a ticket for this behavior. Note that my previous complaint--any supplied value generates a primary key violation--was tested on Windows. Testing just now on Ubuntu, I observe same behavior as you and OP. I have filed the ticket accordingly. I want to retest on Windows, and then will amend ticket or file new bug report. I found a workaround : if I change the field type of the key from integer to bigint then everything works as attended... QGis doesnt tries anymore to give a value when we don't need it. But this is not very logical isn't it? Fabrice Fabrice, it seems that QGIS does allow you to edit an existing feature, so another workaround would be to add feature, save changes allowing Postgres to assign default value from sequence, then edit to change to the desired value. --Lee -- Lee Hachadoorian PhD, Earth Environmental Sciences (Geography) Research Associate, CUNY Center for Urban Research http://freecity.commons.gc.cuny.edu ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
Hi Fabrice, I think this is the intended behaviour. If you leave it to the user to enter the primary key then the db might complain about non-unique keys. On the other hand why would you _want_ to assign a certain key? A key is just a technical field used to identify a dataset. It should not contain any information. On my db I have three tables (point, line, polygon) that insert into the same table representing a n:m relation. I use a sequence on the db and a trigger to assign the next sequence value on INSERT. Apart from that I have no need to interfere with my pk values and I am glad, that QGIS takes care of that. Bernhard Am 15.05.2012 13:07, schrieb F T: Hi all, We are not able to set explicitly the value of an integer primary key field. It is possible to set this value with pgAdmin. But when the feature is created with QGis, it takes the next max value of the field and not the spécified value... To reproduce this strange behaviour : -- create a table in the schema public with an integer primary key CREATE TABLE the_table ( the_key integer NOT NULL, the_obs character varying(150), geom geometry, CONSTRAINT the_table_pkey PRIMARY KEY (the_key), CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2), CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTILINESTRING'::text OR geom IS NULL), CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 2154) ) WITH ( OIDS=TRUE ); -- spatialize the table INSERT INTO geometry_columns(f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES('', 'public', 'the_table', 'geom', 2, 2154, 'MULTILINESTRING'); Then in QGIS : - add this table to a project - create 1 line with the_key=100 and save the edition - open the attribute table and you see the_key=0 - create 1 line with the_key=102 and save the edition - open the attribute table and you see the_key=1 If I modify the value of the_key in pgAdmin, by example put the value 1000 instead of 1, then the next line created with QGis will have the value 1001. Any help is welcome ! Thanks Fabrice ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Information from NOD32 This message was checked by NOD32 Antivirus System for Linux Mail Server. http://www.nod32.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
I think the QGis code should not have this specific behaviour and should follow the standards. If the key doesn't contain any informations and is just a number, then OK we can explicitly tell QGis to use a PostgreSQL sequence to create this arbitrary number. In my case, the values of the key come from an other application and I have to type these values to link the geometrical objects to the database informations. I found a workaround : if I change the field type of the key from integer to bigint then everything works as attended... QGis doesnt tries anymore to give a value when we don't need it. But this is not very logical isn't it? Fabrice 2012/5/15 Bernhard Ströbl bernhard.stro...@jena.de Hi Fabrice, I think this is the intended behaviour. If you leave it to the user to enter the primary key then the db might complain about non-unique keys. On the other hand why would you _want_ to assign a certain key? A key is just a technical field used to identify a dataset. It should not contain any information. On my db I have three tables (point, line, polygon) that insert into the same table representing a n:m relation. I use a sequence on the db and a trigger to assign the next sequence value on INSERT. Apart from that I have no need to interfere with my pk values and I am glad, that QGIS takes care of that. Bernhard Am 15.05.2012 13:07, schrieb F T: Hi all, We are not able to set explicitly the value of an integer primary key field. It is possible to set this value with pgAdmin. But when the feature is created with QGis, it takes the next max value of the field and not the spécified value... To reproduce this strange behaviour : -- create a table in the schema public with an integer primary key CREATE TABLE the_table ( the_key integer NOT NULL, the_obs character varying(150), geom geometry, CONSTRAINT the_table_pkey PRIMARY KEY (the_key), CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2), CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTILINESTRING'::text OR geom IS NULL), CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 2154) ) WITH ( OIDS=TRUE ); -- spatialize the table INSERT INTO geometry_columns(f_table_**catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES('', 'public', 'the_table', 'geom', 2, 2154, 'MULTILINESTRING'); Then in QGIS : - add this table to a project - create 1 line with the_key=100 and save the edition - open the attribute table and you see the_key=0 - create 1 line with the_key=102 and save the edition - open the attribute table and you see the_key=1 If I modify the value of the_key in pgAdmin, by example put the value 1000 instead of 1, then the next line created with QGis will have the value 1001. Any help is welcome ! Thanks Fabrice __**_ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/**mailman/listinfo/qgis-userhttp://lists.osgeo.org/mailman/listinfo/qgis-user Information from NOD32 This message was checked by NOD32 Antivirus System for Linux Mail Server. http://www.nod32.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
Am 15.05.2012 14:16, schrieb F T: I think the QGis code should not have this specific behaviour and should follow the standards. Is there a standard for this? From the db's point of view it is always the responsibility of the user to take care for proper primary keys. He can achieve this by a) using a sequence or b) using a software taking care of it (like QGIS) or c) error-prone manual entering. If the key doesn't contain any informations and is just a number, then OK we can explicitly tell QGis to use a PostgreSQL sequence to create this arbitrary number. This would be option a) or c) in the above sense, QGIS follows option b). In my case, the values of the key come from an other application and I have to type these values to link the geometrical objects to the database informations. So this is a foreign key. I would recommend to use a dedicated field for this. Bernhard I found a workaround : if I change the field type of the key from integer to bigint then everything works as attended... QGis doesnt tries anymore to give a value when we don't need it. But this is not very logical isn't it? Fabrice 2012/5/15 Bernhard Ströbl bernhard.stro...@jena.de mailto:bernhard.stro...@jena.de Hi Fabrice, I think this is the intended behaviour. If you leave it to the user to enter the primary key then the db might complain about non-unique keys. On the other hand why would you _want_ to assign a certain key? A key is just a technical field used to identify a dataset. It should not contain any information. On my db I have three tables (point, line, polygon) that insert into the same table representing a n:m relation. I use a sequence on the db and a trigger to assign the next sequence value on INSERT. Apart from that I have no need to interfere with my pk values and I am glad, that QGIS takes care of that. Bernhard Am 15.05.2012 13:07, schrieb F T: Hi all, We are not able to set explicitly the value of an integer primary key field. It is possible to set this value with pgAdmin. But when the feature is created with QGis, it takes the next max value of the field and not the spécified value... To reproduce this strange behaviour : -- create a table in the schema public with an integer primary key CREATE TABLE the_table ( the_key integer NOT NULL, the_obs character varying(150), geom geometry, CONSTRAINT the_table_pkey PRIMARY KEY (the_key), CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2), CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTILINESTRING'::text OR geom IS NULL), CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 2154) ) WITH ( OIDS=TRUE ); -- spatialize the table INSERT INTO geometry_columns(f_table___catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES('', 'public', 'the_table', 'geom', 2, 2154, 'MULTILINESTRING'); Then in QGIS : - add this table to a project - create 1 line with the_key=100 and save the edition - open the attribute table and you see the_key=0 - create 1 line with the_key=102 and save the edition - open the attribute table and you see the_key=1 If I modify the value of the_key in pgAdmin, by example put the value 1000 instead of 1, then the next line created with QGis will have the value 1001. Any help is welcome ! Thanks Fabrice _ Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/__mailman/listinfo/qgis-user http://lists.osgeo.org/mailman/listinfo/qgis-user Information from NOD32 This message was checked by NOD32 Antivirus System for Linux Mail Server. http://www.nod32.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Information from NOD32 This message was checked by NOD32 Antivirus System for Linux Mail Server. http://www.nod32.com -- Bernhard Ströbl Anwendungsbetreuer GIS Kommunale Immobilien Jena Am Anger 26 07743 Jena Tel.: 03641 49- 5190 E-Mail: bernhard.stro...@jena.de Internet: www.kij.de Kommunale Immobilien Jena Eigenbetrieb der Stadt Jena Werkleiter: Thomas Dirkes Information from NOD32 This message was checked by NOD32 Antivirus System for Linux Mail Server. http://www.nod32.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGis 1.7.4 possible bug with PostgreSQL/Postgis manual integer primary key?
On Tue, May 15, 2012 at 8:31 AM, Bernhard Ströbl bernhard.stro...@jena.de wrote: Am 15.05.2012 14:16, schrieb F T: I think the QGis code should not have this specific behaviour and should follow the standards. Is there a standard for this? From the db's point of view it is always the responsibility of the user to take care for proper primary keys. He can achieve this by a) using a sequence or b) using a software taking care of it (like QGIS) or c) error-prone manual entering. The use of an arbitrary key is commonplace, but not part of the SQL standard or required for normal form. Many table designs use meaningful primary keys, defined from a unique key within the data. To say that A key is just a technical field used to identify a dataset. It should not contain any information. is contentious. There is specifically *not* a standard in SQL. I think the 'standard Fabrice is referring to is this, that keys are not prohibited from being meaningful, and that the application should not just discard data that it allows you to enter and which is not in violation of your table design. In my case, the values of the key come from an other application and I have to type these values to link the geometrical objects to the database informations. So this is a foreign key. I would recommend to use a dedicated field for this. It is not unreasonable to want a foreign key in a one-to-one relationship to match the primary key of the related table. QGIS is not alone among GIS applications in requiring the use of a unique integer key in source data, and of course, it can't tell the difference between a key which is meaningless or meaningful in terms of data design and how the data is used elsewhere. It is a little odd that QGIS allows you to edit the field at all, since applications which use surrogate keys (arbitrary, meaningless integer values) usually also don't allow those keys to be edited. It's even more odd that QGIS allows you to edit the field but then discards a value which does not violate database rules. BTW, I found I could *edit* the primary key field of a table with a key field typed as serial, but when I tried to add a new feature, any value entered manually generated a primary key violation. The column value in QGIS defaulted to nextval('sequence_name'::regclass), matching the column default in the table definition, but also generated a primary key violation. When I cleared the field completely, the row was added with the next available value from the sequence. --Lee Bernhard I found a workaround : if I change the field type of the key from integer to bigint then everything works as attended... QGis doesnt tries anymore to give a value when we don't need it. But this is not very logical isn't it? Fabrice 2012/5/15 Bernhard Ströbl bernhard.stro...@jena.de mailto:bernhard.stro...@jena.de Hi Fabrice, I think this is the intended behaviour. If you leave it to the user to enter the primary key then the db might complain about non-unique keys. On the other hand why would you _want_ to assign a certain key? A key is just a technical field used to identify a dataset. It should not contain any information. On my db I have three tables (point, line, polygon) that insert into the same table representing a n:m relation. I use a sequence on the db and a trigger to assign the next sequence value on INSERT. Apart from that I have no need to interfere with my pk values and I am glad, that QGIS takes care of that. Bernhard Am 15.05.2012 13:07, schrieb F T: Hi all, We are not able to set explicitly the value of an integer primary key field. It is possible to set this value with pgAdmin. But when the feature is created with QGis, it takes the next max value of the field and not the spécified value... To reproduce this strange behaviour : -- create a table in the schema public with an integer primary key CREATE TABLE the_table ( the_key integer NOT NULL, the_obs character varying(150), geom geometry, CONSTRAINT the_table_pkey PRIMARY KEY (the_key), CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2), CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTILINESTRING'::text OR geom IS NULL), CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 2154) ) WITH ( OIDS=TRUE ); -- spatialize the table INSERT INTO geometry_columns(f_table___catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, type) VALUES('', 'public', 'the_table', 'geom', 2, 2154, 'MULTILINESTRING'); Then in QGIS : - add this table to a project - create 1 line with the_key=100 and save the edition - open the attribute table and you see the_key=0
Re: [Qgis-user] QGIS 1.7.4
Is there any news about this problem? I'm trying Union both in 1.7.4 and 1.9.90-Alpha QGIS code revision f3b78ef, in a Windows XP computer. Union is not working correctly, he union the geometries but looses some attributes in the process. Alex PS: just lost the opportunity of selling Quantum GIS to a german trainee... snif On Tue, Feb 28, 2012 at 1:04 PM, Agustin Lobo alobolis...@gmail.com wrote: Correcting myself: it works fine on windows, empty table on ubuntu 10.04 Agus El día 28 de febrero de 2012 13:55, Agustin Lobo alobolis...@gmail.com escribió: Werner, As far as I can see, #4567 Fix Union tool to produce correct attribute table has not been fixed despite the claim in http://www.qgis.org/en/about-qgis/qgis-releases.html 1. On ubuntu, I get an empty table including the fields of both layers (i.e, id for one and id_2 for the other) 2. On windows, the table is populated, but the fields are not merged (i.e, id for one and id_2 for the other), Should I reopen #4567 ? Could some body else verify? This is the kind of error users must be warned about (btw, Merge Shapefiles to one works fine on ubuntu 10.04, but not on windows) Agus ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4
Hi, Union is not working correctly, he union the geometries but looses some attributes in the process. can you please provide sample data and details here http://hub.qgis.org/issues/4567 thanks PS: just lost the opportunity of selling Quantum GIS to a german trainee... snif why? ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4
I will try. Never done this before. Alex PS: Because I challenge her work with QGIS, instead of ArcGIS, but the analysis that she nedeed fail because of the union problem. On Tue, Mar 20, 2012 at 1:27 PM, Giovanni Manghi giovanni.man...@faunalia.pt wrote: Hi, Union is not working correctly, he union the geometries but looses some attributes in the process. can you please provide sample data and details here http://hub.qgis.org/issues/4567 thanks PS: just lost the opportunity of selling Quantum GIS to a german trainee... snif why? ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4
On Tue, 2012-03-20 at 13:56 +, Alexandre Neto wrote: I will try. Never done this before. it is not difficult, you will need an osgeo id https://www2.osgeo.org/cgi-bin/ldap_create_user.py PS: Because I challenge her work with QGIS, instead of ArcGIS, but the analysis that she nedeed fail because of the union problem. there are geoprocessing tools that are also failing in Arc*... ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4
OFC there are, and all the answer you will get if you report a bug is or It will be corrected in the next version (If you are willing to buy it). I'm not complaining. I have successfully Evangelize some people about using Quantum GIS to solve their GIS problems (instead of proprietary softwares). But this time it was not possible, the trainee needed to move on and try to do it in another software. I already post some test data in the issues. Thanks! Alexandre Neto On Tue, Mar 20, 2012 at 2:02 PM, Giovanni Manghi giovanni.man...@faunalia.pt wrote: On Tue, 2012-03-20 at 13:56 +, Alexandre Neto wrote: I will try. Never done this before. it is not difficult, you will need an osgeo id https://www2.osgeo.org/cgi-bin/ldap_create_user.py PS: Because I challenge her work with QGIS, instead of ArcGIS, but the analysis that she nedeed fail because of the union problem. there are geoprocessing tools that are also failing in Arc*... ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4
I had problems with joins with non-spatial data and the not too userfriendly vector opertaions, and this mainly with students. Our solution so far: we use spatialite as backend for students (postgis isn't that easy when lots of external data needs to be joined). It works great: - The initial spatialite db was created using ogr2ogr from our postgis server. - joining data is done in spatialite, with the spatialite-gui tool - new x,y data is created in spatialite too, just link to a file, use the makepoint function, done - spatial operations are performed in spatialite (some tricks needed, once you know, works great) QGIS is used for visualisation and some basic operations. The combination of both products works well for us. Kris Nackaerts Original-Nachricht Datum: Tue, 20 Mar 2012 13:56:50 + Von: Alexandre Neto senhor.n...@gmail.com An: giovanni.man...@faunalia.pt, QGIS User qgis-user@lists.osgeo.org Betreff: Re: [Qgis-user] QGIS 1.7.4 I will try. Never done this before. Alex PS: Because I challenge her work with QGIS, instead of ArcGIS, but the analysis that she nedeed fail because of the union problem. On Tue, Mar 20, 2012 at 1:27 PM, Giovanni Manghi giovanni.man...@faunalia.pt wrote: Hi, Union is not working correctly, he union the geometries but looses some attributes in the process. can you please provide sample data and details here http://hub.qgis.org/issues/4567 thanks PS: just lost the opportunity of selling Quantum GIS to a german trainee... snif why? ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone! Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4 doesn't run in OpenSUSE 12.1
On 27/02/12 21:42, Sascha Eichenauer wrote: On 02/27/2012 09:38 AM, Donovan Cameron wrote: When I try to run qgis from the terminal, the splash shows, but as soon as it gets to the part Starting Python the splash simply closes. The output from the terminal is: *qgis: siplib.c:10938: sipEnumType_alloc: Assertion `(((currentType)-td_flags 0x0007) == 0x0003)' failed.* *Aborted* * * I downloaded and installed QGIS from the geo repository ( http://download.opensuse.org/repositories/Application:/Geo/openSUSE_12.1/) * * QGIS: 1.7.4-Wroclaw OS: OpenSUSE 12.1 with KDE 4.8 Kernel: 3.1.9-1.4-desktop the QGIS in the GEO: repository is built against Qt 4.7 which ships with KDE 4.7. KDE 4.8 comes with Qt 4.8. You either have to build QGIS from source or downgrade to KDE 4.7. That's why I did not upgrade to KDE 4.8... I use KDE 4.8. I downloaded the srpm and built it myself. Fairly straightforward. I had to install some additional dependencies for building and had to comment some lines in the spec file about debugging information (I guess the spec wants me to generate debugging symbols but I don't know how and I was to lazy to investigate). Sebastian signature.asc Description: OpenPGP digital signature ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4 doesn't run in OpenSUSE 12.1
Yes, this is the best solution if you have upgraded KDE to 4.8 Angelos On 02/29/2012 11:45 AM, Sebastian Schubert wrote: On 27/02/12 21:42, Sascha Eichenauer wrote: On 02/27/2012 09:38 AM, Donovan Cameron wrote: When I try to run qgis from the terminal, the splash shows, but as soon as it gets to the part Starting Python the splash simply closes. The output from the terminal is: *qgis: siplib.c:10938: sipEnumType_alloc: Assertion `(((currentType)-td_flags 0x0007) == 0x0003)' failed.* *Aborted* * * I downloaded and installed QGIS from the geo repository ( http://download.opensuse.org/repositories/Application:/Geo/openSUSE_12.1/) * * QGIS: 1.7.4-Wroclaw OS: OpenSUSE 12.1 with KDE 4.8 Kernel: 3.1.9-1.4-desktop the QGIS in the GEO: repository is built against Qt 4.7 which ships with KDE 4.7. KDE 4.8 comes with Qt 4.8. You either have to build QGIS from source or downgrade to KDE 4.7. That's why I did not upgrade to KDE 4.8... I use KDE 4.8. I downloaded the srpm and built it myself. Fairly straightforward. I had to install some additional dependencies for building and had to comment some lines in the spec file about debugging information (I guess the spec wants me to generate debugging symbols but I don't know how and I was to lazy to investigate). Sebastian ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- Angelos Tzotsos Remote Sensing Laboratory National Technical University of Athens http://users.ntua.gr/tzotsos ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4
Werner, As far as I can see, #4567 Fix Union tool to produce correct attribute table has not been fixed despite the claim in http://www.qgis.org/en/about-qgis/qgis-releases.html 1. On ubuntu, I get an empty table including the fields of both layers (i.e, id for one and id_2 for the other) 2. On windows, the table is populated, but the fields are not merged (i.e, id for one and id_2 for the other), Should I reopen #4567 ? Could some body else verify? This is the kind of error users must be warned about (btw, Merge Shapefiles to one works fine on ubuntu 10.04, but not on windows) Agus El día 23 de febrero de 2012 09:52, Werner Macho werner.ma...@gmail.com escribió: Dear Users and Developers, Due to the fact that the qgis-1.7.4.tar.bz2 tarball had some problems which leads to being not able to build QGIS on some Systems the problems were solved and QGIS now should build on any System. As there were only some small changes in the build system, the packages which have already been built are not affected. To provide a source tarball to all people out there who prefer to build QGIS out of the tarball I reuploaded the fixed version of the tarball. It is available from the usual download adress http://qgis.org/downloads/qgis-1.7.4.tar.bz2 sorry for the problems that this tarball might have caused to some people kind regards Werner ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4
Correcting myself: it works fine on windows, empty table on ubuntu 10.04 Agus El día 28 de febrero de 2012 13:55, Agustin Lobo alobolis...@gmail.com escribió: Werner, As far as I can see, #4567 Fix Union tool to produce correct attribute table has not been fixed despite the claim in http://www.qgis.org/en/about-qgis/qgis-releases.html 1. On ubuntu, I get an empty table including the fields of both layers (i.e, id for one and id_2 for the other) 2. On windows, the table is populated, but the fields are not merged (i.e, id for one and id_2 for the other), Should I reopen #4567 ? Could some body else verify? This is the kind of error users must be warned about (btw, Merge Shapefiles to one works fine on ubuntu 10.04, but not on windows) Agus ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] qgis 1.7.4 and libgdal
Il 28/02/2012 17:02, Agustin Lobo ha scritto: Does qgis 1.7.4 (from binaries in ubuntugis-unstable for 10.04) require libgdal1-1.8.0 and python-gdal 1.8.0 or can it work with libgdal1 1.9 and python-gdal 1.9? I keep on with the following dilemma: 1. If I install python-gdal 1.9 I get startup errors such as: Couldn't load plugin openlayers due an error when calling its classFactory() method 2. If I use python-gdal 1.8.02, no startup problems but cannot use gdal tools (within or outside qgis). I think this is a packaging problem: in Debian I can use GDALTools plugin with GDAL 1.7, 1.8 or 1.9. Do not know about OL plugin, but I know it has several issues with current master (so probably also with 1.7.4). All the best. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4 doesn't run in OpenSUSE 12.1
On 02/27/2012 09:38 AM, Donovan Cameron wrote: When I try to run qgis from the terminal, the splash shows, but as soon as it gets to the part Starting Python the splash simply closes. The output from the terminal is: *qgis: siplib.c:10938: sipEnumType_alloc: Assertion `(((currentType)-td_flags 0x0007) == 0x0003)' failed.* *Aborted* * * I downloaded and installed QGIS from the geo repository ( http://download.opensuse.org/repositories/Application:/Geo/openSUSE_12.1/) * * QGIS: 1.7.4-Wroclaw OS: OpenSUSE 12.1 with KDE 4.8 Kernel: 3.1.9-1.4-desktop Regards, Donovan ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user Hey Donovan, the QGIS in the GEO: repository is built against Qt 4.7 which ships with KDE 4.7. KDE 4.8 comes with Qt 4.8. You either have to build QGIS from source or downgrade to KDE 4.7. That's why I did not upgrade to KDE 4.8... Cheers sascha ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4 don't run in Ubuntu 11.10
Olá Esdras, what message do you get launching qgis from the terminal? cheers -- Giovanni -- On Fri, 2012-02-24 at 16:18 -0300, Esdras Andrade wrote: Dear friends, I updated QGIS from version 1.7.3 to 1.7.4 in my pc using Ubuntu Linux 11.10 but the QGIS don't run. I unintall it and reinstall and the beharvior is the same. Can anyone help me? Thanks. -- Esdras Andrade. http://geoparalinux.wordpress.com ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] QGIS 1.7.4 crashes when trying to add WFS layer
it works fine here on Windows 7 32 bit (both for the wfs and wms issues). I tested on qgis 1.7.4/osgeo4w. On Thu, 2012-02-23 at 12:30 +0100, Viktor Kalén wrote: I just upgraded from 1.7.3 to 1.7.4, and when I'm trying to add a WFS layer my QGIS seission crashes. I get this error message qgis.exe stopped working I get the same type of crash when trying to change CRS before adding a WMS layer. I'm using windows 7, 64 bit. QGIS standalone installer Anyone else experienced this? Should i go back to 1.7.3? Viktor Kalén ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user