[TriPython] Setting a 10m buffer on a point in Geopandas

Ryan Cooper ryancooper729 at gmail.com
Thu Jun 7 10:05:47 EDT 2018


Greg-

I haven't had a chance to run this, but looking through the notebook, I
think the issues is gdf.crs doesn't actually transform your data from one
crs to another. It just sets the coordinate reference system for whatever
coordinates you have in your geometry series. You'll need to use the
to_crs() method to transform the coordinates to a new crs:

# Instead of:

gdf.crs = {'init': 'epsg:3395', 'units': 'm'}

# Try:

gdf = gdf.to_crs(3395)


Hopefully this helps!

On Thu, Jun 7, 2018 at 9:40 AM, Greg Frazier <gnfrazier at gmail.com> wrote:

>    Hi I am having trouble setting a radius buffer to a point in Geopandas.
>    Even though my projection uses meters by definition and I add a units
>    parameter of meters, I can't figure out why it is buffering in degrees.
>    Trying to simplify the issue so I could pick apart what I am doing
> wrong I
>    have set up a notebook based on one of the geopandas examples:
>    [1]https://github.com/gnfrazier/geopandas-demo/blob/
> master/geopandas-units-question.ipynb**
>    I hope somebody in the Tripython community can point (no pun intended)
> me
>    in the right direction.
>    Thanks
>    Greg
>
> References
>
>    Visible links
>    1. https://github.com/gnfrazier/geopandas-demo/blob/master/
> geopandas-units-question.ipynb
>
> _______________________________________________
> TriZPUG mailing list
> TriZPUG at python.org
> https://mail.python.org/mailman/listinfo/trizpug
> http://tripython.org is the Triangle Python Users Group
>
>


-- 
Ryan Cooper
Email: ryancooper729 at gmail.com
Web: ryan-m-cooper.com
Twitter: @maptastik <https://twitter.com/maptastik>
GitHub: maptastik <http://github.com/maptastik>
-------------- next part --------------
   Greg-
   I haven't had a chance to run this, but looking through the notebook, I
   think the issues is gdf.crs doesn't actually transform your data from one
   crs to another. It just sets the coordinate reference system for whatever
   coordinates you have in your geometry series. You'll need to use the
   to_crs() method to transform the coordinates to a new crs:

 # Instead of:

 gdf.crs = {'init': 'epsg:3395', 'units': 'm'}

 # Try:

 gdf = gdf.to_crs(3395)

   Hopefully this helps!
   On Thu, Jun 7, 2018 at 9:40 AM, Greg Frazier <[1]gnfrazier at gmail.com>
   wrote:

     ** **Hi I am having trouble setting a radius buffer to a point in
     Geopandas.
     ** **Even though my projection uses meters by definition and I add a
     units
     ** **parameter of meters, I can't figure out why it is buffering in
     degrees.
     ** **Trying to simplify the issue so I could pick apart what I am doing
     wrong I
     ** **have set up a notebook based on one of the geopandas examples:
     **
     **[1][2]https://github.com/gnfrazier/geopandas-demo/blob/master/geopandas-units-question.ipynb**
     ** **I hope somebody in the Tripython community can point (no pun
     intended) me
     ** **in the right direction.
     ** **Thanks
     ** **Greg

     References

     ** **Visible links
     ** **1.
     [3]https://github.com/gnfrazier/geopandas-demo/blob/master/geopandas-units-question.ipynb

     _______________________________________________
     TriZPUG mailing list
     [4]TriZPUG at python.org
     [5]https://mail.python.org/mailman/listinfo/trizpug
     [6]http://tripython.org is the Triangle Python Users Group

   --
   Ryan Cooper
   Email:**[7]ryancooper729 at gmail.com
   Web:**[8]ryan-m-cooper.com
   Twitter:**[9]@maptastik
   GitHub:**[10]maptastik

References

   Visible links
   1. mailto:gnfrazier at gmail.com
   2. https://github.com/gnfrazier/geopandas-demo/blob/master/geopandas-units-question.ipynb**
   3. https://github.com/gnfrazier/geopandas-demo/blob/master/geopandas-units-question.ipynb
   4. mailto:TriZPUG at python.org
   5. https://mail.python.org/mailman/listinfo/trizpug
   6. http://tripython.org/
   7. mailto:ryancooper729 at gmail.com
   8. http://ryan-m-cooper.com/
   9. https://twitter.com/maptastik
  10. http://github.com/maptastik


More information about the TriZPUG mailing list