Comments (7)
Yeah but there's an assertion that it can only be called once. Seems like some deeper surgery will be necessary.
from pandana.
Difficult to know why it doesn't just returns in case it's already initialized.
Or why it's not called from the first insert.
Perhaps configuration and initialization are done in the same call?
from pandana.
Well you have to tell it how many POI categories you're going to have, so this is the call that does that. Then the first call that you initialize will only initialize one category, and each successive call will initialize a category. It seems to make sense. It'd be nice to be able to change the number of categories after the first step, but that doesn't seem support by CH.
As for the assertion, don't those only exist when compiled in debug mode?
from pandana.
Looks like that we need to solve this in order to solve #73. When I look at the code, I wonder why we can't just reinitialize an element of poiIndexArray, or even make it longer or shorter. Is it more complicated than that? It very well might be - I didn't look too much deeper than that. Remember Dennis just did this work in a few days so maybe he just didn't want to add the methods and do the error checking to modify the array...
from pandana.
Fede, if you look at #81 I started re-initialize the POI indexes in order to solve #73. It seems to work ok, so I think what you were discussing here should work - you shouldn't have to call init_pois.
from pandana.
Right. What you say seems to be right.
As always, with C++ it's often difficult to understand all the container / memory handling until you get to the last line of the code and check that there are no strange allocations, but it doesn't seem to be the case.
In principle, two comments:
-
The
poiIndexArray
is astd::vector
, so it's totally safe to add / remove / replace objects, as defined here. -
The other important point is the class of the elements contained in that structure. Of course, they are of type
POIIndexArray
. I looked a bit into the constructor and destructor and in principle there's nothing to worry about. The same about the members of the class, there are twostd::shared_ptr
s that should take care of their memory well, and there is a pointer to the graph that AFAIK won't be an issue at destruction time.
from pandana.
Fixed by #87
from pandana.
Related Issues (20)
- Support for M1 Macs HOT 3
- [Question] How to get different Key|Value combinations in osm.node_query
- [Feature Request] Aggreggation queries to subset of nodes
- Binary incompatibility error with older versions of NumPy HOT 1
- Shortest path length exists but shortest path is empty HOT 5
- shortest path distance between non connected nodes
- Allow specifying mapping distance for POIs
- Issue: the POI Accessibility computation is taking forever
- OSM loader - POIs that are ways in OSM HOT 1
- Pandana network initiation slow for large network HOT 4
- how to increase the performance of the aggregate when impedance is changed to time?
- net.shortest_paths doesn't work with multiprocessing
- tables sub-dependency versions conflict with python 3.10 compatibility when installing with pip HOT 1
- incorrect shortest paths solutions when impendance values are particularly small or large HOT 1
- Plotting with Pandana does not render title HOT 1
- osm.pdna_network_from_bbox error HOT 6
- Pulling network object from OSM bugged HOT 2
- New release ?
- Google Colab install pandana error HOT 1
- query the OSM API for the street network within the specified bounding box error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandana.