Giter Club home page Giter Club logo

Comments (12)

edzer avatar edzer commented on May 23, 2024

Way to go, Robin!

More realistically, simple features do not represent networks, so creating, managing and analyzing networks still remains to be done. An advantage would be that you can constrain to LINESTRINGs between nodes, this is something sp cannot do - it only represents MULTILINESTRINGs (which, of course, can be of length 1 - this is the current splanr approach IIRC).

from stplanr.

Robinlovelace avatar Robinlovelace commented on May 23, 2024

Thanks for that - yes limiting it to LINESTRINGS will have advantages and creates a good basis for classes representing roads etc if we want to go that way (not sure we do...). One to think about anyway...

from stplanr.

richardellison avatar richardellison commented on May 23, 2024

I was thinking about this the other day. Networks are clearly important I think.

If we're adopting sf then we could potentially use the PostGIS topology model (that converts simple features into topologies) in some way.

from stplanr.

edzer avatar edzer commented on May 23, 2024

GDAL has GNM; is that useful? Does it connect to the PostGIS topology model?

from stplanr.

richardellison avatar richardellison commented on May 23, 2024

I hadn't seen GNM before. It seems a driver could be written to connect GNM to PostGIS. GNM may be the more appropriate choice though as sf uses GDAL.

Is GNM consistent with the structure of sf?

from stplanr.

edzer avatar edzer commented on May 23, 2024

I haven't looked into that; my assumption is that edges will be features, but a network must consist of nodes, edges, and their graph/topology.

from stplanr.

richardellison avatar richardellison commented on May 23, 2024

Yes, I agree that it would be most likely for edges to be features. I suppose you could add additional columns to represent the connecting nodes (anode, bnode). It would then need additional functions to calculate shortest paths, identify weights (could be yet another column), etc.

from stplanr.

Robinlovelace avatar Robinlovelace commented on May 23, 2024

Suggested policy: implement all new features that are easily implementable with sf in sf then add an argument sf_out = FALSE which means we'll return an sp object by default unless the user specify otherwise. That way:

  1. We don't force people to use these strange things called simple features until they're good and ready (and the package is ready for the prime time).
  2. We get to learn sf Wahey.
  3. The user gets faster code :)

What do you reckon to this @richardellison?

@edzer are there any issues you know of with setting sf as an import? I.e. is it a pain to install on some computers?

Possible knock-on benefit: will increase knowledge of this new paradigm for spatial data in R and encourage people to upgrade their GDAL version!

from stplanr.

edzer avatar edzer commented on May 23, 2024

The MacOS ports are not yet on CRAN, meaning install.packages("sf") will not work there (Simon Urbanek's build farm is still at gdal 1.11)

from stplanr.

Robinlovelace avatar Robinlovelace commented on May 23, 2024

Ah OK, makes sense for that to get sorted then I guess. Ta 4 the info.

from stplanr.

richardellison avatar richardellison commented on May 23, 2024

Sounds reasonable but we should wait for MacOS ports unless there is a way of only optionally including it? In other words, check if sf is installed (or available on CRAN) and if not use sp only.

from stplanr.

Robinlovelace avatar Robinlovelace commented on May 23, 2024

Agreed. Good discussion. Closing for now and keep an eye open for sf Mac ports!

from stplanr.

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.