Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing tools #1

Open
stephenfrank opened this issue Sep 26, 2013 · 7 comments
Open

Parsing tools #1

stephenfrank opened this issue Sep 26, 2013 · 7 comments

Comments

@stephenfrank
Copy link

Hey Jason,

I'm working on a project requiring a city/suburb data and this data looks pretty accurate (or about as accurate as SA can be). This is after I bought the www.geopostcodes.com data and was pretty disappointed with it.

Firstly, is there any one-stop (hopefully free) source for this data?

If not, do you have any hot tips for parsing these *.shx, *.shp and *.dbf files into something manageable so that I can build this database?

I've opened up the .dbf files but they lack the lng/lat data. I've used this parsing library (https://github.com/fillerwriter/PHP5-Shape-File-Parser) which is able to read the .shp file but doesn't seem to combine that with the .dbf data. Argh!

-Stephen

@adieyal
Copy link
Collaborator

adieyal commented Sep 27, 2013

Hi Stephen

What data are you looking for? The census contains information on subplaces and mainplaces (which are more or less analogous to suburbs and towns).

with regards to parsing shape files - I generally use pyshp ([1]) but I'm not sure what the equivalent php tool is.

Happy to help more if I can

[1] http://code.google.com/p/pyshp/

@j-norwood-young
Copy link
Owner

Hey Stephen

I've been using Topojson to generate stuff I can use straight on the unterwebs. It runs on Node.js, but should work through Homebrew. (I just popped up a Vagrant instance for it, based on https://github.com/semmypurewal/node-dev-bootstrap, but I had that lying around.)

Also check out Tilemill, you can import the shape files straight in there and start making cool maps right away. http://www.mapbox.com/tilemill/

What OS you on? Adi knows all the cool Linux tools, and I'm starting to get my head around the Mac tools.

J

On 26 Sep 2013, at 6:24 PM, stephenfrank [email protected] wrote:

Hey Jason,

I'm working on a project requiring a city/suburb data and this data looks pretty accurate (or about as accurate as SA can be). This is after I bought the www.geopostcodes.com data and was pretty disappointed with it.

Firstly, is there any one-stop (hopefully free) source for this data?

If not, do you have any hot tips for parsing these *.shx, *.shp and *.dbf files into something manageable so that I can build this database?

I've opened up the .dbf files but they lack the lng/lat data. I've used this parsing library (https://github.com/fillerwriter/PHP5-Shape-File-Parser) which is able to read the .shp file but doesn't seem to combine that with the .dbf data. Argh!

-Stephen


Reply to this email directly or view it on GitHub.

@stephenfrank
Copy link
Author

@adieyal I was looking to use the "main places" and "sub places" as something analogous to towns/suburbs though I can see how they might not be exactly the same thing. I'm willing to see how it turns out.

@j-norwood-young I'm on OSX/Linux and will check out those tools.

That all being said, I've just noticed that the .dbf file opens in OpenOffice and has a column "OBJECTID,N,9,0" that correlates to the exactly to the number of polygons in the .shp file. I'm going to take a crack at munging them together.

@adieyal
Copy link
Collaborator

adieyal commented Sep 27, 2013

Yup - dbf/shp are an archaic format. The only index between them is line
number. If you just need to extract the data, then openoffice is fine. If
you need to do anything more than that, I really suggest you find an
appropriate library. You're walking down a well travelled path.

Regarding main places vs sub places - know that in a metro area such as
Cape Town, large suburbs are considered to be main places. For instance
Khayelitsha is a main place

Adi

Adi Eyal
Data Specialist
phone: +27 78 014 2469
skype: adieyalcas
linkedin: http://za.linkedin.com/pub/dir/Adi/Eyal

On 27 September 2013 10:25, stephenfrank [email protected] wrote:

@adieyal https://github.com/adieyal I was looking to use the "main
places" and "sub places" as something analogous to towns/suburbs though I
can see how they might not be exactly the same thing. I'm willing to see
how it turns out.

@j-norwood-young https://github.com/j-norwood-young I'm on OSX/Linux
and will check out those tools.

That all being said, I've just noticed that the .dbf file opens in
OpenOffice and has a column "OBJECTID,N,9,0" that correlates to the exactly
to the number of polygons in the .shp file. I'm going to take a crack at
munging them together.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-25230016
.

j-norwood-young pushed a commit that referenced this issue Jul 12, 2016
2016 boundaries (local, districts and wards)
@WillemBadenhorst
Copy link

Dear Jason. Seems like there is an issue with the zipped voting districts files. Can you please reload or is it me that doesn't know how to download?

Kind regards
Willem

@MotsumiDarts
Copy link

MotsumiDarts commented Jul 21, 2023 via email

@WillemBadenhorst
Copy link

WillemBadenhorst commented Jul 21, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants