[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qgis-user
Subject:    Re: [Qgis-user] Draw Ellipse/Polygons for areas of maximum concentration
From:       Bernd Vogelgesang <bernd.vogelgesang () gmx ! de>
Date:       2021-04-30 12:14:08
Message-ID: ccd7ad44-189f-1c8a-b742-97d4b129840c () gmx ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


As you mention degree as unit for the distance, I assume that you are
working with unprojected data. 1 degree is a huge distance, so
consequently, all points will fall into this area and form one cluster.

You'll have to project your data and find some meaningful value for the
distance to get different clusters.

On 30.04.21 02:02, krishna Ayyala wrote:
> Nyall,
> Thanks for your reply. I have used the "dbscan clustering". In this, the
> default values for "Minimum Cluster Size" is 5 and Max distance between
> cluster points is 1 degrees. I ran with the same default values. I am
> getting output with the layer name "Clusters". This has generated a new
> field "Cluster_ID". All the points have same Cluster_ID i.e. 1. This has
> also generated new field called "Cluster_Size". All the points have same
> cluster size i.e. 1699. Can you please help me on how to get 4 different
> cluster ID's.
>
> Regards.
>
> On Thu, Apr 29, 2021 at 4:29 PM Nyall Dawson <nyall.dawson@gmail.com> wr=
ote:
>
>>
>> On Fri, 30 Apr 2021 at 08:25, krishna Ayyala <ayyalakrishna@gmail.com>
>> wrote:
>>
>>> Chris,
>>> Thanks for the reply. Yes, I did run k-means clustering for 4 clusters=
.
>>> It is creating a new layer called "clusters". This layer has a field c=
alled
>>> Cluster_id, ranging from 1 to 4. But, this method is considering all t=
he
>>> points within the circle. I am looking for the points outside the elli=
pses
>>> to be omitted (should not be considered)
>>>
>> In this case "dbscan clustering" is more appropriate.
>>
>>
>>> . Also K-means clustering is not generating any polygons/ellipses. We
>>> have to identify a cluster based on the Cluster_ID. I am curious if th=
ere
>>> is any tool within Qgis that can produce results similar to the circle=
 with
>>> ellipses?
>>>
>> What you could do is dissolve the points based on the cluster_id field,
>> and then generate convex (or concave) hulls enclosing each set of point=
s.
>> You won't get ellipses, but you'll get polygons describing the boundari=
es.
>> (And it would be relatively straightforward to wrap up these steps into=
 a
>> single graphical model so that you have one tool which gives the desire=
d
>> output!).
>>
>> Nyall
>>
>>
>>
>>
>>> Regards.
>>>
>>> On Thu, Apr 29, 2021 at 3:56 PM chris hermansen <clhermansen@gmail.com=
>
>>> wrote:
>>>
>>>> Krishna and list,
>>>>
>>>> On Thu, Apr 29, 2021 at 2:51 PM krishna Ayyala <ayyalakrishna@gmail.c=
om>
>>>> wrote:
>>>>
>>>>> Hello,
>>>>> I have a circle in which there are randomly distributed points as
>>>>> below. Each point is a customer.
>>>>>
>>>>> [image: image.png]
>>>>>
>>>>>
>>>>> Is there a tool within QGIS that can automatically generate four
>>>>> polygons or four ellipses such as below. These polygons are the area=
s of
>>>>> maximum concentration of the customers?
>>>>>
>>>>> [image: image.png]
>>>>>
>>>>> You could try k-means clustering
>>>>
>>>> https://docs.qgis.org/3.4/en/docs/user_manual/processing_algs/qgis/ve=
ctoranalysis.html#k-means-clustering
>>>>
>>>> --
>>>> Chris Hermansen =C2=B7 clhermansen "at" gmail "dot" com
>>>>
>>>> C'est ma fa=C3=A7on de parler.
>>>>
>>> _______________________________________________
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

[Attachment #5 (text/html)]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>As you mention degree as unit for the distance, I assume that you
      are working with unprojected data. 1 degree is a huge distance, so
      consequently, all points will fall into this area and form one
      cluster.</p>
    <p>You'll have to project your data and find some meaningful value
      for the distance to get different clusters.<br>
    </p>
    <div class="moz-cite-prefix">On 30.04.21 02:02, krishna Ayyala
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CADUrCAjMXjf8E9__nXfLE2DS+9+V3ijirrq5ekOSCBjUnyyR_g@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">Nyall,
Thanks for your reply. I have used the "dbscan clustering". In this, the
default values for "Minimum Cluster Size" is 5 and Max distance between
cluster points is 1 degrees. I ran with the same default values. I am
getting output with the layer name "Clusters". This has generated a new
field "Cluster_ID". All the points have same Cluster_ID i.e. 1. This has
also generated new field called "Cluster_Size". All the points have same
cluster size i.e. 1699. Can you please help me on how to get 4 different
cluster ID's.

Regards.

On Thu, Apr 29, 2021 at 4:29 PM Nyall Dawson <a class="moz-txt-link-rfc2396E" \
href="mailto:nyall.dawson@gmail.com">&lt;nyall.dawson@gmail.com&gt;</a> wrote:

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">

On Fri, 30 Apr 2021 at 08:25, krishna Ayyala <a class="moz-txt-link-rfc2396E" \
href="mailto:ayyalakrishna@gmail.com">&lt;ayyalakrishna@gmail.com&gt;</a> wrote:

</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">Chris,
Thanks for the reply. Yes, I did run k-means clustering for 4 clusters.
It is creating a new layer called "clusters". This layer has a field called
Cluster_id, ranging from 1 to 4. But, this method is considering all the
points within the circle. I am looking for the points outside the ellipses
to be omitted (should not be considered)

</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
In this case "dbscan clustering" is more appropriate.


</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">. Also K-means clustering is not \
generating any polygons/ellipses. We have to identify a cluster based on the \
Cluster_ID. I am curious if there is any tool within Qgis that can produce results \
similar to the circle with ellipses?

</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
What you could do is dissolve the points based on the cluster_id field,
and then generate convex (or concave) hulls enclosing each set of points.
You won't get ellipses, but you'll get polygons describing the boundaries.
(And it would be relatively straightforward to wrap up these steps into a
single graphical model so that you have one tool which gives the desired
output!).

Nyall




</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">
Regards.

On Thu, Apr 29, 2021 at 3:56 PM chris hermansen <a class="moz-txt-link-rfc2396E" \
href="mailto:clhermansen@gmail.com">&lt;clhermansen@gmail.com&gt;</a> wrote:

</pre>
          <blockquote type="cite">
            <pre class="moz-quote-pre" wrap="">Krishna and list,

On Thu, Apr 29, 2021 at 2:51 PM krishna Ayyala <a class="moz-txt-link-rfc2396E" \
href="mailto:ayyalakrishna@gmail.com">&lt;ayyalakrishna@gmail.com&gt;</a> wrote:

</pre>
            <blockquote type="cite">
              <pre class="moz-quote-pre" wrap="">Hello,
I have a circle in which there are randomly distributed points as
below. Each point is a customer.

[image: image.png]


Is there a tool within QGIS that can automatically generate four
polygons or four ellipses such as below. These polygons are the areas of
maximum concentration of the customers?

[image: image.png]

You could try k-means clustering
</pre>
            </blockquote>
            <pre class="moz-quote-pre" wrap="">

<a class="moz-txt-link-freetext" \
href="https://docs.qgis.org/3.4/en/docs/user_manual/processing_algs/qgis/vectoranalysi \
s.html#k-means-clustering">https://docs.qgis.org/3.4/en/docs/user_manual/processing_algs/qgis/vectoranalysis.html#k-means-clustering</a>


--
Chris Hermansen  · clhermansen "at" gmail "dot" com

C'est ma faƧon de parler.

</pre>
          </blockquote>
          <pre class="moz-quote-pre" \
wrap="">_______________________________________________ Qgis-user mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a> List info: <a \
class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
                
Unsubscribe: <a class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>


</pre>
        </blockquote>
        <pre class="moz-quote-pre" wrap="">
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" \
wrap="">_______________________________________________ Qgis-user mailing list
<a class="moz-txt-link-abbreviated" \
href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a> List info: <a \
class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
                
Unsubscribe: <a class="moz-txt-link-freetext" \
href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
 </pre>
    </blockquote>
  </body>
</html>



_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic