Closed markjd84 closed 7 months ago
Yes this seems to happen whether you use WKT or Shapefiles...
Like i said, not an Aequilibrae problem, more just me being less familiar with Pandas, but it feels like the sort of thing that might trip others up...
It would be nice to have an Africa-Wide AequilibraE model, @markjd84 ! ;-P I'll close this, as it is not a bug.
@markjd84 , since you are using it for paid consulting, please consider having your company help fund the development of AequilibraE.
Thanks Pedro - and sorry I missed your reply, my GH notifications were pointing to the wrong place...
On your last point, you are right of course :-) I will raise it internally. I can't make any promises - it's above my pay grade, but I will definitely raise it.
And as for the whole-Africa model - watch this space! It may be that our client wants to make it FLOSS once finished...
I know... we lost that bid to you guys... ;-) I know the group at your client's well.
Really i think this is an upstream bug, but it seems like the sort of thing that may come up again here, so just highlighting to let others decide what to do with it...
We are using Aequilibrae in a consultancy project with a network that will eventually cover a whole continent :)
In adding links per the example, I was using geometry from a shapefile instead of a WKT-CSV, which seemed reasonable at the time (!)
But then my link loading would always get stuck about 10% of the way in, with:
sqlite3.IntegrityError: CHECK constraint failed: TYPEOF(b_node) == 'integer'
Which is weird, because, as far as i can see, Aequilibrae handles the node ids - I hadn't tried to create/change any.
The problem seems to be that loading a link network in from Shapefile (not CSV), some coordinates happen to over-precise and hence GeoPandas produces something like:
I guess that it is these coordinates which are then used when generating nodes for
project.network
- as i understand it, nodes are generated automatically. But something must happen with Shapely (or whatever) that fails with the exponential notation and doesn't create the node. If you can't create the node, you then can't create the link.If you generate the geometry like so:
...you don't get this issue.
I will check whether the same issue comes up if we use WKT-CSV, but it feels like i won't be the last person to try using shapefiles for link networks so worth highlighting (even if we on-hold/close the issue, since it's probably a Shapely problem)
Edit: fwiw, i know that 10 dps in coordinates is silly, and I should just round them...