<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi,<br>
    </p>
    <p>This will print the bounds for each object in a shapefile.</p>
    <p>Nicolas<br>
    </p>
    <div class="moz-cite-prefix">On 2019-12-10 9:49 a.m., Jason McVay
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGHb012+KGjVUVx7NknXACn8n7ODR3B0D5gZv0kQ0p+a=7KM2A@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi Adam, and Nicolas,
        <div><br>
        </div>
        <div>I think I understand conceptually how using
          shapely/geopandas to loop in coordinates to a pdal pipeline
          should work. But if you can pass along an example that would
          be greatly appreciated!</div>
        <div><br>
        </div>
        <div>Thanks again,</div>
        <div><br>
        </div>
        <div>
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">
              <div dir="ltr">
                <div dir="ltr"><span>
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>Jason McVay<br>
                            </div>
                          </div>
                          <br>
                        </div>
                        MS Geography, Virginia Tech<br>
                      </div>
                      BA Environmental Studies, University of Montana<br>
                      <a href="http://www.linkedin.com/in/jasonmcvay86/"
                        title="View public profile"
name="SignatureSanitizer_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_14933b4cad52e0be_SafeHtmlFilter_webProfileURL"
                        target="_blank" moz-do-not-send="true">www.linkedin.com/in/jasonmcvay86/</a><br>
                      <span><a href="https://twitter.com/jasonmcvay"
                          target="_blank" moz-do-not-send="true">https://twitter.com/jasonmcvay</a></span></div>
                    <div dir="ltr"><br>
                    </div>
                    <div dir="ltr"><br>
                      <i>"May your trails be crooked, winding, lonesome,
                        dangerous, leading to the most amazing view"</i></div>
                    <div dir="ltr">- Ed Abbey<br>
                    </div>
                  </span></div>
              </div>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, Dec 9, 2019 at 6:09 PM
          Nicolas Cadieux <<a
            href="mailto:nicolas.cadieux@archeotec.ca"
            moz-do-not-send="true">nicolas.cadieux@archeotec.ca</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="auto">
            <div dir="ltr">Hi,</div>
            <div dir="ltr">I will send him a similar python loop
              tomorrow for inspiration.  Did not have time to look at
              this today.</div>
            <div dir="ltr">Nicolas </div>
            <div dir="ltr"><br>
              <blockquote type="cite">Le 9 déc. 2019 à 17:36, adam steer
                <<a href="mailto:adam.d.steer@gmail.com"
                  target="_blank" moz-do-not-send="true">adam.d.steer@gmail.com</a>>
                a écrit :<br>
                <br>
              </blockquote>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div dir="ltr">Hi Jason
                  <div><br>
                  </div>
                  <div>Weighing in late here, it’s possible to cobble
                    together fiona/shapely/pdal to loop through a bunch
                    of polygons (or process them in parallel) and do
                    what you need. It’s a task that’s on my list of
                    things to do when I get time :)</div>
                  <div><br>
                  </div>
                  <div>That way you can assemble a processing pipeline
                    which goes straight from some geometries to data,
                    without waiting for the new PR..</div>
                  <div><br>
                  </div>
                  <div>Cheers,</div>
                  <div><br>
                  </div>
                  <div>Adam</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Tue, 10 Dec 2019
                    at 07:42, Jason McVay <<a
                      href="mailto:jasonmcvay09@gmail.com"
                      target="_blank" moz-do-not-send="true">jasonmcvay09@gmail.com</a>>
                    wrote:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px
                    0px 0.8ex;border-left:1px solid
                    rgb(204,204,204);padding-left:1ex">
                    <div dir="ltr">Thanks Howard! I think this is the
                      way to go. I would be interested in exploring the
                      pull request version as well, but I may have to
                      wait until after the holiday break to get to that.<br
                        clear="all">
                      <div>
                        <div dir="ltr">
                          <div dir="ltr">
                            <div dir="ltr"><span>
                                <div dir="ltr">
                                  <div>
                                    <div>
                                      <div>
                                        <div>Jason McVay<br>
                                        </div>
                                      </div>
                                      <br>
                                    </div>
                                    MS Geography, Virginia Tech<br>
                                  </div>
                                  BA Environmental Studies, University
                                  of Montana<br>
                                  <a
                                    href="http://www.linkedin.com/in/jasonmcvay86/"
                                    title="View public profile"
name="m_887783605245393027_m_-4303008207359753313_SignatureSanitizer_SafeHtmlFilter_UNIQUE_ID_SafeHtmlFilter_14933b4cad52e0be_SafeHtmlFilter_webProfileURL"
                                    target="_blank"
                                    moz-do-not-send="true">www.linkedin.com/in/jasonmcvay86/</a><br>
                                  <span><a
                                      href="https://twitter.com/jasonmcvay"
                                      target="_blank"
                                      moz-do-not-send="true">https://twitter.com/jasonmcvay</a></span></div>
                                <div dir="ltr"><br>
                                  <i>"May your trails be crooked,
                                    winding, lonesome, dangerous,
                                    leading to the most amazing view"</i></div>
                                <div dir="ltr">- Ed Abbey<br>
                                </div>
                              </span></div>
                          </div>
                        </div>
                      </div>
                      <br>
                    </div>
                    <br>
                    <div class="gmail_quote">
                      <div dir="ltr" class="gmail_attr">On Mon, Dec 9,
                        2019 at 8:36 AM Howard Butler <<a
                          href="mailto:howard@hobu.co" target="_blank"
                          moz-do-not-send="true">howard@hobu.co</a>>
                        wrote:<br>
                      </div>
                      <blockquote class="gmail_quote" style="margin:0px
                        0px 0px 0.8ex;border-left:1px solid
                        rgb(204,204,204);padding-left:1ex">
                        <div><br>
                          <div><br>
                            <blockquote type="cite">
                              <div>On Dec 8, 2019, at 7:09 PM, Jason
                                McVay <<a
                                  href="mailto:jasonmcvay09@gmail.com"
                                  target="_blank" moz-do-not-send="true">jasonmcvay09@gmail.com</a>>
                                wrote:</div>
                              <br>
                              <div>
                                <div dir="ltr">I'm looking for some
                                  advice on the best way/how to loop in
                                  thousands of bounding coordinates into
                                  a pdal pipeline.
                                  <div><br>
                                  </div>
                                  <div>I have a csv (and a geojson) of
                                    several thousand min/max x/y and a
                                    unique ID. The AOI's are not very
                                    big, so the pipeline runs quickly,
                                    but there are a lot of AOIs to
                                    capture! I'm querying an entwine
                                    dataset, the extent of which is
                                    national, so I'm limiting the data
                                    with a bounding box of each AOI.</div>
                                  <div><br>
                                  </div>
                                  <div>My pipeline currently runs HAG
                                    and Ferry Z filter, then uses the
                                    gdal.writer to make a GeoTiff at 1m
                                    resolution. It works perfectly when
                                    I manually enter in a set of test
                                    coordinates. How can I scale this to
                                    loop and update the bounds
                                    automatically?</div>
                                  <div><br>
                                  </div>
                                  <div>I'm running this locally on a
                                    MacBook Pro.</div>
                                  <div><br>
                                  </div>
                                  <div>Thank you, any advice is
                                    appreciated!<br>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                            <br>
                          </div>
                          <div>Jason,</div>
                          <div><br>
                          </div>
                          <div>PDAL doesn't multithread or operate in a
                            parallel fashion for you. You must use
                            external tools to do this yourself. I have
                            had good success using GNU parallel or xargs
                            on bash along with the Python
                            multiprocessing library to achieve that.</div>
                          <div><br>
                          </div>
                          <div>You scenario would seem to fit that model
                            quite well. Here's a GNU parallel example.
                            In short, use your favorite scripting
                            language (or sed/awk/cat) to write a script
                            that contains all of the job entries you
                            need to run (bounds entries are all the same
                            in my example, but you should get the point:</div>
                          <div><br>
                          </div>
                          <div>
                            <blockquote type="cite">
                              <div>pdal pipeline pipe.json
                                --readers.ept.filename="<a
                                  moz-do-not-send="true">ept://http://path/to/location</a>"
                                --readers.ept.bounds="([-10063436.56,
                                -10060190.36], [5038996.16,
                                5043062.79])"
                                --writers.gdal.filename="hag_mean_henry_co.tif"</div>
                              <div>pdal pipeline pipe.json
                                --readers.ept.filename="<a
                                  moz-do-not-send="true">ept://http://path/to/location</a>"
                                --readers.ept.bounds="([-10063436.56,
                                -10060190.36], [5038996.16,
                                5043062.79])"
                                --writers.gdal.filename="hag_mean_howard_co.tif"</div>
                              <div>pdal pipeline pipe.json
                                --readers.ept.filename="<a
                                  moz-do-not-send="true">ept://http://path/to/location</a>"
                                --readers.ept.bounds="([-10063436.56,
                                -10060190.36], [5038996.16,
                                5043062.79])"
                                --writers.gdal.filename="hag_mean_james_co.tif"</div>
                              <div>pdal pipeline pipe.json
                                --readers.ept.filename="<a
                                  moz-do-not-send="true">ept://http://path/to/location</a>"
                                --readers.ept.bounds="([-10063436.56,
                                -10060190.36], [5038996.16,
                                5043062.79])"
                                --writers.gdal.filename="hag_mean_mike_co.tif"</div>
                            </blockquote>
                            <div>
                              <div><br>
                              </div>
                            </div>
                            <div><br>
                            </div>
                            <div>Then run that script:</div>
                            <div><br>
                            </div>
                            <div>
                              <blockquote type="cite">parallel -j 16
                                < jobs.txt</blockquote>
                              <div><br>
                              </div>
                              <div>Filtering EPT resources with
                                boundaries is a common desire. I
                                recently added a pull request to master
                                (not yet released) that allows you to
                                specify filtering (for faster query) and
                                cropping (eliminating an extra stage
                                specification) for EPT resources. See <a
href="https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fPDAL%2fPDAL%2fpull%2f2771%23issue%2d323371431&umid=1ef705ee-0b38-4b1b-9373-2ccf4d0eb417&auth=ab4b424674be62c9f8f9e1c1a31e433d534186a3-f8290d8713ab4ed5b3666d9bbdf34b2c63f8b5c8"
                                  target="_blank" moz-do-not-send="true">https://github.com/PDAL/PDAL/pull/2771#issue-323371431</a> The
                                goal with the approach in the pull
                                request is to not have to change format
                                of the bounding geometries to text
                                simply to feed them into a pipeline. We
                                may add similar capability to other
                                drivers if it is indeed useful in other
                                contexts. </div>
                              <div><br>
                              </div>
                              <div>With the PR, you could express your
                                query boundaries as an OGR query and
                                then iterate through your EPT resources.
                                The current PR implementation doesn't
                                "split" by the polygons, however. We
                                might need to add the same capability to
                                filters.crop to achieve that. Feedback
                                is appreciated so we can learn how
                                people wish to use this.</div>
                              <div><br>
                              </div>
                              <div>Howard</div>
                              <div><br>
                              </div>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    _______________________________________________<br>
                    pdal mailing list<br>
                    <a href="mailto:pdal@lists.osgeo.org"
                      target="_blank" moz-do-not-send="true">pdal@lists.osgeo.org</a><br>
                    <a
                      href="https://lists.osgeo.org/mailman/listinfo/pdal"
                      rel="noreferrer" target="_blank"
                      moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/pdal</a></blockquote>
                </div>
                <br clear="all">
                <div><br>
                </div>
                -- <br>
                <div dir="ltr">
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">
                            <div dir="ltr">
                              <div>Dr. Adam Steer</div>
                              <div><a
href="https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fspatialised.net&umid=73b42ec6-c163-4304-9ef2-a1d38eac8f79&auth=72ce7397d0db234fdd09ad1e9584ffcc03ba0336-066b12425d4ebeb1bf4522439ac18d619101f119"
                                  target="_blank" moz-do-not-send="true">http://spatialised.net</a></div>
                              <div><a
                                  href="https://www.researchgate.net/profile/Adam_Steer"
                                  target="_blank" moz-do-not-send="true">https://www.researchgate.net/profile/Adam_Steer</a><br>
                                <a
                                  href="http://au.linkedin.com/in/adamsteer"
                                  target="_blank" moz-do-not-send="true">http://au.linkedin.com/in/adamsteer</a></div>
                              <div><a
                                  href="http://orcid.org/0000-0003-0046-7236"
                                  target="_blank" moz-do-not-send="true">http://orcid.org/0000-0003-0046-7236</a><br>
                                +61 427 091 712 ::  @adamdsteer</div>
                              <div><br>
                              </div>
                              <div>Suits are bad for business: <a
                                  href="http://www.spatialised.net/business-penguins/"
                                  target="_blank" moz-do-not-send="true">http://www.spatialised.net/business-penguins/</a></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <span>_______________________________________________</span><br>
                <span>pdal mailing list</span><br>
                <span><a href="mailto:pdal@lists.osgeo.org"
                    target="_blank" moz-do-not-send="true">pdal@lists.osgeo.org</a></span><br>
                <span><a
                    href="https://lists.osgeo.org/mailman/listinfo/pdal"
                    target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/pdal</a></span></div>
            </blockquote>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>