Coder Social home page Coder Social logo

Comments (5)

tim-salabim avatar tim-salabim commented on August 16, 2024 1

Can you

library(sf)

p1 = st_point(c(7,52))
p2 = st_point(c(-30,20))
sfc = st_sfc(p1, p2, crs = 4326)
sfc
st_transform(sfc, 3857)

or does that error too?

from mapview.

edzer avatar edzer commented on August 16, 2024 1

Please try installing the dev version of sf from r-universe, and report back whether that solved the issue. See also r-spatial/sf#2298

from mapview.

MTOliveira avatar MTOliveira commented on August 16, 2024 1

@edzer @tim-salabim you were correct, the issue was connected to the sf package - I installed it from the r-universe and mapview does not give that error anymore. Thanks!

from mapview.

MTOliveira avatar MTOliveira commented on August 16, 2024

It gives back an error, yes...

> library(sf)

> p1 = st_point(c(7,52))
> p2 = st_point(c(-30,20))

> sfc = st_sfc(p1, p2, crs = 4326)
Warning message:
In CPL_crs_from_input(x) :
  GDAL Error 1: PROJ: proj_create_from_database: C:\Program Files\PostgreSQL\9.6\share\contrib\postgis-3.1\proj\proj.db lacks DATABASE.LAYOUT.VERSION.MAJOR / DATABASE.LAYOUT.VERSION.MINOR metadata. It comes from another PROJ installation.

> sfc
Geometry set for 2 features 
Geometry type: POINT
Dimension:     XY
Bounding box:  xmin: -30 ymin: 20 xmax: 7 ymax: 52
CRS:           NA
POINT (7 52)
POINT (-30 20)

> st_transform(sfc, 3857)
Error in st_transform.sfc(sfc, 3857) : 
  cannot transform sfc object with missing crs

from mapview.

tim-salabim avatar tim-salabim commented on August 16, 2024

I think something is wrong with you sf installation. In any case, it doesn't seem to be a mapview issue

from mapview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.