Re: [QGIS-Developer] MinimumRectangle implementation

2017-06-07 Thread Nyall Dawson
On 6 June 2017 at 18:43, Paul Jobling  wrote:

> I am implementing geo in the Kognitio WX2 database using GEOS as a backend,
> though I am using my own code for many things. One of those things is
> ST_MinimumRectangle, which I have implemented as the rectangle with the
> smallest area that encloses the geometry. This is different to the
> implementation that I see you have recently added, which extrapolates from
> the MinimumDiameter property.
>
>
>
> For example, ST_MinimumRectangle ('POLYGON((1 2, 3 0, 5 2, 3 2, 2 3, 1 2))')
> has an area of 9.6 (and a perimeter of 12.65) using the MinimumDiameter
> implementation, whereas my implementation finds the actual minimum – with an
> area of 8 (and perimeter of 11.31) - it is POLYGON ((5 2, 3 0, 1 2, 3 4, 5
> 2)) rather than POLYGON((1.4 3.2, 0.6 0.8, 4.2 -0.4,5 2, 1.4 3.2)).
>
>
>
> My question is why has this implementation been decided on – is it just that
> MimimumDiameter is already present? Or is there some other reason due to
> some standard?

Did you mean to post this to the GEOS mailing lists instead?

Anyway, some background from QGIS' perspective. A while ago I was
looking for a minimum rect implementation, so ported JTS'
implementation over to GEOS. I then exposed this to the QgsGeometry
API, but to my suprise found that the results were not ideal. At the
time there was some python code in processing which performed a MBR
calculation, and I found that the area of rectangles calculated by
this python code was smaller then JTS' algorithm. Additionally, I
thought it created subjectively 'more aesthetically pleasing'
rectangles (when used as atlas feature extents, and also output the
angle/width/height of these rectangles (the GEOS implementation
doesn't expose this). So I ported the Python code over to c++ as
QgsGeometry::orientedMinimumBoundingBox and updated the processing alg
to use this c++ method instead. The guts of this algorithm sits in
https://github.com/qgis/QGIS/blob/master/src/core/geometry/qgsgeometry.cpp#L890
.

Does that clarify?

Nyall
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] USNG Coordinate System

2017-06-07 Thread Joshua Quesenberry
Good Evening Everyone,

 

I haven't seen any replies to my post over the weekend. Can someone take a
look?

 

Thanks,

 

Josh Q

 

From: Joshua Quesenberry [mailto:engn...@gmail.com] 
Sent: Saturday, June 3, 2017 2:56 PM
To: 'qgis-developer' 
Cc: engn...@gmail.com
Subject: USNG Coordinate System

 

All,

 

Is there some way to plot USNG coordinates in QGIS? And if not, when will
support for that be added?

 

Thanks,

 

Josh Q

___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

[QGIS-Developer] Exploring the new node tool: questions and bugs(?)

2017-06-07 Thread DelazJ
Hi,
I'm using the new digitizing system to do a work and despite my trials, I
fail to find how to do some things and have some questions:

- Is the node editor panel gone forever? Or is it hidden, in which case how
can I enable it?

- Trying to add a vertex on a existing segment, I double-click the segment
at the place I'd like the new vertex but nothing seems to happen. And when
I move the mouse, there is also a (new) vertex being moved. I fail to
simply add the vertex without moving it (it adds it and catches it, I
presume). Am I doing something wrong?

- Click and drag  helps to select many vertices from different features.
But when I I have some features selected, I think one would expect to have
only vertices of the selected features. Otherwise, selecting vertex on a
common boundary becomes a pain, because you neve know which feature has its
vertex selected.

Are there issues/features request I should report in Redmine? Anyone to
help me find the right ways to do my edits, please?
Thanks.

Harrissou
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] [Qgis-developer] Are there plans to create a unique "Add layer" tool?

2017-06-07 Thread domlysz
Hi,

Thank you very mutch for this work.

It would be usefull to add an explicit entry for opening non spatial tabular
data like ods, xls or dbf. It's really un-intuitive to add this kind of
datasource by vector dialog and the user needs to control how the first line
will be interpreted (column header or not). Actually there is no way to
control this and adding a spreadsheet give unpredictable column headers.



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Are-there-plans-to-create-a-unique-Add-layer-tool-tp5315336p5323359.html
Sent from the QGIS - Developer mailing list archive at Nabble.com.
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [QGIS-Developer] Lizmap - "Story map" feature POC with QGIS user map data

2017-06-07 Thread kimaidou
Hi Tom

I prefer to use a layer as a source, because this way you can use it
* to zoom on somewhere (each layer feature ) -> no need to set up bookmarks
in QGIS
* display some information (title, description, photo, etc.) based on each
feature GetFeatureInfo request
I could use any other lizmap feature based on a layer to add more tools
(such as selection, filter of child data based on the active parent
feature, etc.)

If I base this tool on QGIS bookmarks, I ask the editor to create many
bookmarks, and I cannot find enough information for each bookmark item.
Basing the tool on a simple layer is more flexible in my opinion, since you
are not limited on which information you use for each feature.

Michaël

2017-06-06 20:45 GMT+02:00 Tom Chadwin :

> Hi Michaël
>
> Have you thought of basing it on QGIS bookmarks instead? No need to
> dedicate
> a field for the "order" property then.
>
> Tom
>
>
>
> -
> Buy Pie Spy: Adventures in British pastry 2010-11 on Amazon
> --
> View this message in context: http://osgeo-org.1560.x6.
> nabble.com/QGIS-Developer-Lizmap-Story-map-feature-POC-
> with-QGIS-user-map-data-tp5323217p5323254.html
> Sent from the QGIS - Developer mailing list archive at Nabble.com.
> ___
> QGIS-Developer mailing list
> QGIS-Developer@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer