<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>I would convert your raster to vector. <br>
    </p>
    <p>Assuming you are on 2.18 (which is what I am currently using) -
      open your processing toolbox. At the top of QGIS click on
      Processing -> Toolbox. <br>
    </p>
    <p>1. In your toolbox go to GDAL/OGR -> Conversion ->
      Polygonize raster to Vector. Once you change that to a vector file
      then go to the next step. <br>
    </p>
    <p>2. In your toolbox go to QGIS geoalgorithms -> Vector Analysis
      Tools -> Count points in polygons. That should add a field to
      your new polygon shapefile with the number of points in that
      polygon. <br>
    </p>
    <p>Good Luck. <br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 11/28/2016 09:37 PM, K Imran M
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADop7+iGvK+TpyoU1M-+X+522o=xg0tSNK_D=9wNwXGVvNCPnQ@mail.gmail.com"
      type="cite">
      <div dir="ltr"><span
          style="color:rgb(42,46,46);font-family:"helvetica
          neue",arial,sans-serif;font-size:15px">Dear all,</span>
        <div><span
            style="color:rgb(42,46,46);font-family:"helvetica
            neue",arial,sans-serif;font-size:15px"><br>
          </span></div>
        <div><span
            style="color:rgb(42,46,46);font-family:"helvetica
            neue",arial,sans-serif;font-size:15px">I apologize if
            this has been asnwered before. My question is:</span></div>
        <div><span
            style="color:rgb(42,46,46);font-family:"helvetica
            neue",arial,sans-serif;font-size:15px"><br>
          </span></div>
        <div>
          <div><span
              style="color:rgb(42,46,46);font-family:"helvetica
              neue",arial,sans-serif;font-size:15px">if I have 2
              layers- one is a vector (points in shapefile format) layer
              and the other one is a raster layer (flood area). And I
              would like to count the number of points inside the flood
              area. How can I do that? Should I convert the raster to
              vector first? Can anyone kindly refer me to any resource
              if you know any?</span>
            <div><span
                style="color:rgb(42,46,46);font-family:"helvetica
                neue",arial,sans-serif;font-size:15px"><br>
              </span></div>
            <div><span
                style="color:rgb(42,46,46);font-family:"helvetica
                neue",arial,sans-serif;font-size:15px">Best
                regards.</span><br clear="all">
              <div><br>
              </div>
              <div>Kamarul</div>
              <div><br>
              </div>
              <div>---------------------------------------------------------------------</div>
              <div><br>
              </div>
              <div>Kamarul Imran Musa (MD MCommunityMed)<br>
              </div>
              <div class="gmail_signature">Associate Professor
                (Epidemiology and Biostatistics) &  <br>
                Public Health Physician,<br>
                <br>
                <br>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
------------------------------------------------
Randal Hale
North River Geographic Systems, Inc
<a class="moz-txt-link-freetext" href="http://www.northrivergeographic.com">http://www.northrivergeographic.com</a>
423.653.3611 <a class="moz-txt-link-abbreviated" href="mailto:rjhale@northrivergeographic.com">rjhale@northrivergeographic.com</a>
twitter:rjhale     <a class="moz-txt-link-freetext" href="http://about.me/rjhale">http://about.me/rjhale</a>
<a class="moz-txt-link-freetext" href="http://www.northrivergeographic.com/introduction-to-quantum-gis">http://www.northrivergeographic.com/introduction-to-quantum-gis</a>
<a class="moz-txt-link-freetext" href="https://www.facebook.com/NRGSInc">https://www.facebook.com/NRGSInc</a></pre>
  </body>
</html>