[Qgis-developer] [Python] splitGeometry
Hi, I am trying to split a geometry (polygon) with a line, the line is straight and crossing the polygon's boundary exactly twice; here is my code: result, newGeometries, topoTestPoints = myGeometry.splitGeometry(splitterPList, True) the result is 0 (OK) but newGeometries contains only _one_ polygon. I was under the impression that newGeometries would contain _all_ polygons resulting from the split operation, i.e. the two halves at each side of the line. If this is the intended behaviour I think I can make a workaround with myGeometry.difference(newGeometries[0]), if it is not I will file a ticket. Bernhard __ Information from ESET Mail Security, version of virus signature database 8544 (20130709) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] [Python] splitGeometry
Hi Bernard, If I remember well, when you do myGeom.splitGeometry, it returns the splitted geometry which is removed from myGeom. So basically, you do have both parts. Cheers, Denis On 07/09/2013 01:15 PM, Bernhard Ströbl wrote: Hi, I am trying to split a geometry (polygon) with a line, the line is straight and crossing the polygon's boundary exactly twice; here is my code: result, newGeometries, topoTestPoints = myGeometry.splitGeometry(splitterPList, True) the result is 0 (OK) but newGeometries contains only _one_ polygon. I was under the impression that newGeometries would contain _all_ polygons resulting from the split operation, i.e. the two halves at each side of the line. If this is the intended behaviour I think I can make a workaround with myGeometry.difference(newGeometries[0]), if it is not I will file a ticket. Bernhard __ Information from ESET Mail Security, version of virus signature database 8544 (20130709) __ The message was checked by ESET Mail Security. http://www.eset.com ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Dbmanager - import several shapefiles into a single postgis layer (append)
Hi all I usually use ogr2ogr whenever I want to load several shapefile in the same PostGIS table. I have recently seen that the import tool has an option Add data to a layer in the Action groupbox. But I cannot use it since it remains greyed out whatever the options I choose (selection a schema then an existing table in the comboboxes). Is this feature already working or should I stay with ogr2ogr --append for a while ? Thanks in advance Michael ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Dbmanager - import several shapefiles into a single postgis layer (append)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 09/07/2013 14:23, kimaidou ha scritto: Is this feature already working or should I stay with ogr2ogr --append for a while ? Unfortunately it has not been implemented yet. All the best. - -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlHcAS8ACgkQ/NedwLUzIr6kGwCgj9+QeURTZPXw2blSu8B6+FRn PHAAn3FjiC3DL+80X2LnIXIwdr4gtaHu =4yhq -END PGP SIGNATURE- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Dbmanager - import several shapefiles into a single postgis layer (append)
Thanks Paolo for your prompt answer. The idea was to show a simple way for end-users. I will tell them to use the Vector Merge shapefile tool, and then import the merged shapefile with DbManager (or via drag and drop from the browser) Regards Michael 2013/7/9 Paolo Cavallini cavall...@faunalia.it -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 09/07/2013 14:23, kimaidou ha scritto: Is this feature already working or should I stay with ogr2ogr --append for a while ? Unfortunately it has not been implemented yet. All the best. - -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlHcAS8ACgkQ/NedwLUzIr6kGwCgj9+QeURTZPXw2blSu8B6+FRn PHAAn3FjiC3DL+80X2LnIXIwdr4gtaHu =4yhq -END PGP SIGNATURE- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] map rendering time much longer on windows than on ubuntu
Hi all, I noticed that QGIS renders much slower on windows than on ubuntu. This is the configuration: Windows 7 64 bits QGIS master from Osgeo4W vs Ubuntu 12.04 64its QGIS compiled on computer The windows computer is more recent and powerful than ubuntu's one. I have mainly PostGIS layers. Is it a know issue/problem/feature whatever? Is there something I can do to speed up Thanks a lot, Denis ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] map rendering time much longer on windows than on ubuntu
Apart from a dozen things influencing the rendering speed on a particular machine mostly related to the datasource (e.g. network/disk speed...), the binary itself can also be optimized by not including the debug symbols. But to be accurate, one would need to do a more in-depth profiling of the problem... -- Matthias On Die 09 Jul 2013 14:38:24 CEST, Denis Rouzaud wrote: Hi all, I noticed that QGIS renders much slower on windows than on ubuntu. This is the configuration: Windows 7 64 bits QGIS master from Osgeo4W vs Ubuntu 12.04 64its QGIS compiled on computer The windows computer is more recent and powerful than ubuntu's one. I have mainly PostGIS layers. Is it a know issue/problem/feature whatever? Is there something I can do to speed up Thanks a lot, Denis ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] map rendering time much longer on windows than on ubuntu
Hi, Another difference, besides debug vs. no-debug, may be the qt version. The QGIS installers for Windows still use qt version 4.7, while most modern Linux distributions use version 4.8. Version 4.8 may have some performance improvements? Maybe that explains some of the difference. Just a wild guess, Andreas Am 09.07.2013 14:38, schrieb Denis Rouzaud: Hi all, I noticed that QGIS renders much slower on windows than on ubuntu. This is the configuration: Windows 7 64 bits QGIS master from Osgeo4W vs Ubuntu 12.04 64its QGIS compiled on computer The windows computer is more recent and powerful than ubuntu's one. I have mainly PostGIS layers. Is it a know issue/problem/feature whatever? Is there something I can do to speed up Thanks a lot, Denis ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Vector attribute types compatibility
What circumstances do exist, where we are not be able to determine the native type based upon QgsField metainformation, but without using typeName? I think we should focus on the development on an unambiguous type schema (QgsFields) and only use the typeName (with provider information?) as a very last resort. We could then introduce a method QgsField::canConvertTo( QgsField other ) and let this method return yes / yes with constraints (as you described, truncate, round etc) / no. Right now, the QgsFields::operator== is abused for this operation, but it's not really accurate, like a number of bugs (FieldCalculator leaves you with a column full of NULL's after saving) have shown already. I already introduced this patch [1] to deal with the current state. I'm not sure if in addition to precision and length another field number of bits or bytes should be introduced? (I'm not familiar enought with the providers to answer this question, but I remember having seen INT8, INT16 etc. datatypes) Additionally, these fields (precision, length, bytes) should also be able to carry information like not applicable or unlimited, so canConvertTo knows, if it needs to compare these fields also or compare them in a special way. E.g. String types won't need precision E.g. String types can have length unlimited Regards, Matthias [1] https://github.com/qgis/Quantum-GIS/commit/0b780b0a5df8817415873ef2a55286566d53b293 On Son 07 Jul 2013 12:26:55 CEST, Marco Hugentobler wrote: Hi Radim Thanks for raising this important point. but the same typeName may have different meaning for different drivers How about passing a string that tells the origin provider string? The data provider could then recognise if it comes from the same provider and use the native types. If not, it should use the Qt type and information from QgsField (e.g. length, precision. Probably more in future? ). Regards, Marco Am 05.07.2013 14:42, schrieb Radim Blazek: I would like to ask how vector attribute types conversion between providers is supposed to work. Currently: QgsMemoryProvider: * mNativeTypes: int(10), double(20,5), string(255) * addAttributes() silently skips the field if type is not Int, Double or String, does not test length and precision, always returns true. QgsOgrProvider: * mNativeTypes: int(10), double(20,15), string(255), date, datetime (the types should be taken from OGR because depend on OGR driver, but I don't see any function in OGR to get supported types) * addAttributes(): if type is not supported, the field is not added, error is set and returns false, supported fields are added however. * createEmptyLayer() is using QgsVectorFileWriter which has its own field types handling (different from QgsOgrProvider::addAttributes()) and calls directly OGR_L_CreateField() * convertField(): doing the same as QgsVectorFileWriter (copy pasted code) but not used at all QgsPostgresProvider: * mNativeTypes: int(0), longlong(0), double (20,20), string(255), date (there are more types defined but these are those with max lengh/precision per QVariant type) * addAttributes(): is using field typeName() to add fields, but typeName is always provider specific so it may become problem if fields come from another provider. If single field fails, no fields are added (transaction) and false is returned * createEmptyLayer(): is using convertField() (that is why d'n'd does not fail) on all fields and then addAttributes() * convertField(): sets field typeName based on type The problems I see: * impossible to take simply fields from one provider and add them to another one, for example: * ogr - memory: numbers are often double(24,15) or date * ogr - postgres: ogr is using String as typeName which fails as type in postgres, postgres mNativeTypes are too short * postgres provider addAttribute() takes typeName (which may be whatever) as type for add column * no method to convert not supported field to a supported one + get message (for example, string cut to 255 characters or date converted to string I believe that, from user point of view, if data are being written to a provider which does not supported all data types, then: * user should be warned before the data are written, getting a list of necessary type conversions and length/precision cuts * if confirmed by user, all the data should be written converted to supported types but there is no support for that in API. My suggestion: * add virtual QgsField QgsVectorDataProvider::supportedField(field, ok, message) which would try to convert unsupported field to a supported field and set message about conversion, it should almost never fail * all methods adding fields (createEmptyLayer, QgsVectorFileWriter) should use the same provider addAttributes() * provider addAttributes() should first check if all fields are supported using supportedField() and add nothing if at least one is unsupported (if some
Re: [Qgis-developer] CyberTracker integration
Hi Justin, I'm using both programs (well, actually, just starting with cybertracker) (I'm the one who collaborated to solvve the problem of running CT on Mac) I think you should keep CT as simple as possible, not only because of the low-literate users but also because in the field you want to have what you need and only what you need. The CT approach in which you design your own template is very good. What I can see as an advantage is an efficient way of trasnfering the info collected with CT to Qgis, perhaps through a spatialite object or some other open spatial database. But I would not add gis capabilites to CT. Regarding the ability of having more mapping capabilities in the field, I wonder if you could make use of Oruxmaps, it works very well on Android, I use it a lot in the field and for navigating the aerial campaigns. Agus On Mon, Jul 8, 2013 at 5:14 PM, Justin Steventon jus...@steventon.com wrote: Hi Antonio, One area of difference with CyberTracker is that it captures data as name+value pairs. Converting to shape file attributes therefore tends to be lossy. Alternatively, one data set point might be able to populate several shape file attributes. I’m not sure how to deal with this yet, but my thinking is that we would go simple and fully automatic first. The integration involves converting a shape to a data model, sending the data model to CyberTracker and managing the return of the data. For the purposes of analysis, I’m thinking that any feature that CyberTracker has that is not in QGIS yet, would be built in parallel over time. We have relatively simple charts (like effort, distance travelled, etc), but also something called Index of Abundance which would be nice to have open (if it’s not already there). Cheers, -Justin From: Antonio Locandro [mailto:antoniolocan...@hotmail.com] Sent: Sunday, July 7, 2013 9:13 PM To: Justin Steventon Cc: qgis-developer@lists.osgeo.org Subject: RE: [Qgis-developer] CyberTracker integration Thats understandable the differences, now Justin can you specify more about how would you like to make the integration I am thinking you would probably want to do the data collection using CyberTracker, then export it or download it to be used within QGIS. Now what is it that you would want to do with the data inside QGIS? Depending on your goals you may want to create a plugin that would take the data and do certain predefined analysis Regards Antonio Locandro From: jus...@steventon.com To: antoniolocan...@hotmail.com; madman...@gmail.com CC: qgis-developer@lists.osgeo.org Subject: RE: [Qgis-developer] CyberTracker integration Date: Sun, 7 Jul 2013 13:47:37 -0700 Hi Antonio, Yes, similar to Fulcrum. I’ve been following them for a while now and think they are doing a lot of things right. They’re missing a few components that are important for us, e.g. full offline (for security) and support for a number of in-field scenarios. It’s possible these features will be created over time. The proprietary nature of Fulcrum would tend to turn off some potential groups in the same way as it occasionally has for us. So far, we have not seen meaningful support for low literate users in any major product. As more and more folks have smart phones, this may pick up. Cheers, -Justin From: Antonio Locandro [mailto:antoniolocan...@hotmail.com] Sent: Sunday, July 7, 2013 8:54 AM To: Justin Steventon; 'Nathan Woodrow' Cc: qgis-developer@lists.osgeo.org Subject: RE: [Qgis-developer] CyberTracker integration Hi Justin I think your project seems a little bit similar to http://fulcrumapp.com/ http://fulcrumapp.com/features/ for field data collection, maybe just missing the part for people who can read or write What they do is capture data using custom forms on the field and then you sync over the internet on the cloud, once on a computer you can export the data to use with GIS software and create PDF reports Probably a similar approach? Antonio Locandro From: jus...@steventon.com To: madman...@gmail.com Date: Sat, 6 Jul 2013 23:07:25 -0700 CC: qgis-developer@lists.osgeo.org Subject: Re: [Qgis-developer] CyberTracker integration That’s true, I missed the concept of a form in the description on the site. My interest is in a rich, user friendly data capture experience, especially for cases where the field user is not a QGIS user and may not be able to read or write. Our studies indicate that this is also a more efficient way to capture data for literate users. Over the years we’ve rolled our own mini-GIS for the desktop, but the scalability of this approach is clearly limited. Since we’re a non-profit and in the process of opening our code, it makes sense to leverage an existing system. Of the solutions I have investigated, QGIS seems most aligned at the technical level. We do bring some
[Qgis-developer] Toolbar and Panel defaults
Hi, I had a look at the current defaults for toolbars and panels. A new user of QGIS 2.0 should not be overwhelmed with too many buttons and windows, but we should guide him to find important features like the embedded browser. In my opinion there are some defaults which could be optimized to reach this goal. Toolbars: -Turn off Advanced Digitizing -Move Label to second row Panels: -Turn on Layer order and Browser in a tabbed view with Layers Print composer: -Place all toolbars in one row Regards Pirmin -- Pirmin Kalberer Sourcepole - Linux Open Source Solutions http://www.sourcepole.com ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Toolbar and Panel defaults
afaik the layer order actually is hiding but the control rendering order checkbox is enabled This is quite confusing for an user. I guess the better is hide and control rendering order disable by default. 2013/7/9 Tim Sutton li...@linfiniti.com Hi On Tue, Jul 9, 2013 at 10:55 PM, Pirmin Kalberer pi...@sourcepole.comwrote: Panels: -Turn on Layer order and Browser in a tabbed view with Layers IMHO Layer order is an advanced feature and should be hidden by default - novice users are heavily confused by the fact that the legend order and the render order can be managed separately. Regards Tim -- Pirmin Kalberer Sourcepole - Linux Open Source Solutions http://www.sourcepole.com ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) == Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Irc: timlinux on #qgis at freenode.net == ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] map rendering time much longer on windows than on ubuntu
In the case that debug symbols are affecting speed, should setting this as an environment variable help?: QGIS_DEBUG=-1 Date: Tue, 09 Jul 2013 14:53:06 +0200 From: Matthias Kuhn matthias.k...@gmx.ch To: Denis Rouzaud denis.rouz...@gmail.com Cc: qgis-dev qgis-developer@lists.osgeo.org Subject: Re: [Qgis-developer] map rendering time much longer on windows than on ubuntu Message-ID: 51dc07b2.6030...@gmx.ch Content-Type: text/plain; charset=UTF-8 Apart from a dozen things influencing the rendering speed on a particular machine mostly related to the datasource (e.g. network/disk speed...), the binary itself can also be optimized by not including the debug symbols. But to be accurate, one would need to do a more in-depth profiling of the problem... -- Matthias On Die 09 Jul 2013 14:38:24 CEST, Denis Rouzaud wrote: Hi all, I noticed that QGIS renders much slower on windows than on ubuntu. This is the configuration: Windows 7 64 bits QGIS master from Osgeo4W vs Ubuntu 12.04 64its QGIS compiled on computer The windows computer is more recent and powerful than ubuntu's one. I have mainly PostGIS layers. Is it a know issue/problem/feature whatever? Is there something I can do to speed up Thanks a lot, Denis ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Toolbar and Panel defaults
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 10/07/2013 00:23, Andrea Peri ha scritto: the layer order actually is hiding but the control rendering order checkbox is enabled This is quite confusing for an user. I guess the better is hide and control rendering order disable by default. agreed. as for the rest: * Browser on, tabbed with Layers * all Print composer toolbars in one row * no strong opinion about placement of Label As for the Toolbar Advanced Digitizing, I'm unsure about hiding it: newbies could easily miss important tools. It would be good to hide all digitizing tools unless digitizing is on. Thanks for raising this. - -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlHc7+kACgkQ/NedwLUzIr4JpwCeJe+ouH8e8O2tGmtQzh+aoWto 5mAAn1eW9yMi8FDDzCNfbwP9mW1UBVwZ =pJZc -END PGP SIGNATURE- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer