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

Fix ultra-green cities issue #22

Open
cmatthew opened this issue Feb 14, 2013 · 11 comments
Open

Fix ultra-green cities issue #22

cmatthew opened this issue Feb 14, 2013 · 11 comments
Assignees
Milestone

Comments

@cmatthew
Copy link
Collaborator

LA and some other ciites turn out to look very green. No one knows why.

@ghost ghost assigned rickmcgeer Mar 9, 2013
@cmatthew
Copy link
Collaborator Author

cmatthew commented Mar 9, 2013

@rickmcgeer there is a test case on greenspace.py.

@rickmcgeer
Copy link
Owner

@cmatthew @stredger @yyzhuang It's hanging in an ogrinfo command in trim.crop. I can run the command from the command line and it works fine, but it produces 100KB in output. So I am wondering if we are running into a situation where the process can't continue until python reads something from the pipe

@rickmcgeer
Copy link
Owner

The command is ogrinfo /tmp/tmpXaXw2p/tmp/19804.shp 19804, and
$ ogrinfo /tmp/tmpXaXw2p/tmp/19804.shp 19804 | wc
26 2246 103554

@cmatthew
Copy link
Collaborator Author

Does it produce a lot of output?

there is p.communicate().

On 2013-03-09, at 5:30 PM, rickmcgeer [email protected] wrote:

The command is ogrinfo /tmp/tmpXaXw2p/tmp/19804.shp 19804, and
$ ogrinfo /tmp/tmpXaXw2p/tmp/19804.shp 19804 | wc
26 2246 103554


Reply to this email directly or view it on GitHub.

@rickmcgeer
Copy link
Owner

stackoverflow claims when you blow the buffers stuff hangs. I'm trying subprocess.check_output

@yyzhuang
Copy link
Collaborator

Which py file? Can I take a look?

@rickmcgeer
Copy link
Owner

trim.py. I'm playing with the copy on grack06:

/usr/local/src/greencities

@yyzhuang
Copy link
Collaborator

Just curious.. reproject_shapefile(full_shapefile, shapefile, new_projcode, shapefile_tmpDir) what's the use of full_shapefile, if you already have a parameter called shapefile?

in here: cmd = 'ogr2ogr -s_srs "EPSG:32624" -t_srs "EPSG:' + new_projcode + '" ' + new_fil + " " + full_shapefile
Is EPSG:32624 the right code?

@cmatthew
Copy link
Collaborator Author

I dunno. I think one is used as the location of the file, the other is used to pick out the names of the rows to reproject inside the shapefile. Or something like that?

On 2013-03-10, at 3:51 PM, Yanyan Zhuang [email protected] wrote:

Just curious.. reproject_shapefile(full_shapefile, shapefile, new_projcode, shapefile_tmpDir) what's the use of full_shapefile, if you already have a parameter called shapefile?

in here: cmd = 'ogr2ogr -s_srs "EPSG:32624" -t_srs "EPSG:' + new_projcode + '" ' + new_fil + " " + full_shapefile
Is EPSG:32624 the right code?


Reply to this email directly or view it on GitHub.

@rickmcgeer
Copy link
Owner

Full shapefile is the fully qualified name of the shapefile

Sent via the Samsung Galaxy S™III, an AT&T 4G LTE smartphone

-------- Original message --------
From: Chris Matthews [email protected]
Date:
To: rickmcgeer/TransCloud [email protected]
Cc: rickmcgeer [email protected]
Subject: Re: [TransCloud] Fix ultra-green cities issue (#22)

I dunno. I think one is used as the location of the file, the other is used to pick out the names of the rows to reproject inside the shapefile. Or something like that?

On 2013-03-10, at 3:51 PM, Yanyan Zhuang [email protected] wrote:

Just curious.. reproject_shapefile(full_shapefile, shapefile, new_projcode, shapefile_tmpDir) what's the use of full_shapefile, if you already have a parameter called shapefile?

in here: cmd = 'ogr2ogr -s_srs "EPSG:32624" -t_srs "EPSG:' + new_projcode + '" ' + new_fil + " " + full_shapefile
Is EPSG:32624 the right code?


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.

@rickmcgeer
Copy link
Owner

I should really expand on this. Our previous version of the code was
filling the /tmp disk with temp files generated during the computation,
which was never cleaned up. To fix this bug, I built a file manager which
assigned a temporary directory for ALL of the temp files generated by a
worker, which could be deleted at the end of the run. To make this work, I
changed the file names used through the processing pipeline to the absolute
path names. However, in some cases the local name was also required
(typically because it was used as a base name for various other files). In
those cases, I left the base name in bnut also passed in the absolute name;
this is shapefile_full.

On Sun, Mar 10, 2013 at 8:23 PM, Rick [email protected] wrote:

Full shapefile is the fully qualified name of the shapefile

Sent via the Samsung Galaxy S™III, an AT&T 4G LTE smartphone

-------- Original message --------
From: Chris Matthews [email protected]
Date:
To: rickmcgeer/TransCloud [email protected]
Cc: rickmcgeer [email protected]
Subject: Re: [TransCloud] Fix ultra-green cities issue (#22)

I dunno. I think one is used as the location of the file, the other is
used to pick out the names of the rows to reproject inside the shapefile.
Or something like that?

On 2013-03-10, at 3:51 PM, Yanyan Zhuang [email protected]
wrote:

Just curious.. reproject_shapefile(full_shapefile, shapefile,
new_projcode, shapefile_tmpDir) what's the use of full_shapefile, if you
already have a parameter called shapefile?

in here: cmd = 'ogr2ogr -s_srs "EPSG:32624" -t_srs "EPSG:' +
new_projcode + '" ' + new_fil + " " + full_shapefile
Is EPSG:32624 the right code?


Reply to this email directly or view it on GitHub.


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

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

No branches or pull requests

3 participants