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

No Lidar data #22

Open
Orug28 opened this issue May 13, 2020 · 9 comments
Open

No Lidar data #22

Orug28 opened this issue May 13, 2020 · 9 comments

Comments

@Orug28
Copy link

Orug28 commented May 13, 2020

I have created a world with this code on a raspberry pi 3 b but it doesn't seem like it is pulling any lidar data as when i load the world on 1.12.2 it only resembles the openstreetmap tiles and doesn't have any detail other than plain brick buildings. i have found no errors shown when generating the world and the size is 1 km square.

Any ideas on possible solutions?

@RobinWhitfield
Copy link

Fixed by #23

The .json file format from gov.uk appears to have changed.

@Orug28
Copy link
Author

Orug28 commented Jun 24, 2020

Ok thanks for the reply would there be any way i could fix this manually or would i have to wait for an update?

Edit: Ive not used github that much before but i just found the update you made under #23. has this been added to the main file or has it not been approved yet?

@RobinWhitfield
Copy link

RobinWhitfield commented Jun 24, 2020

It's very easy to fix manually.

Within /lib/Elevation/UKDEFRA.pm, change the section at line 179 from
foreach my $model_i ( qw/ DSM DTM / ) { foreach my $k ( keys %{$datasets->{"LIDAR Composite $model_i"}->{Latest}->{"$model_i 1M"}} ) { push @{$self->{zips}->{$code}->{$model_i}}, $datasets->{"LIDAR Composite $model_i"}->{Latest}->{"$model_i 1M"}->{$k}; } }

to

foreach my $model_i ( qw/ DSM DTM / ) { my $maxyear = 0; foreach my $k ( keys %{$datasets->{"LIDAR Composite $model_i"}} ) { if ($k > $maxyear) { $maxyear = $k; } } foreach my $k ( keys %{$datasets->{"LIDAR Composite $model_i"}->{$maxyear}->{"$model_i 1M"}} ) { push @{$self->{zips}->{$code}->{$model_i}}, $datasets->{"LIDAR Composite $model_i"}->{$maxyear}->{"$model_i 1M"}->{$k}; } }

Edit, oof formatting.

This might be clearer: 8be969c

The pull request has not yet been approved.

@RobinWhitfield
Copy link

I managed to mess up my branches so it's now in a new pull request: #25

@RobinWhitfield
Copy link

RobinWhitfield commented Jun 29, 2020

I don't know whether you had any success with that, but it does appear that the latest LIDAR data in some areas uses a different format to what this program expects. You can sanity check what it downloads in the DTM and DSM folders (they should look very similar, full of .asc files).

In my case for Leeds I found that I was actually getting the best results forcing the date to 2017 to get valid files.

@cgutteridge
Copy link
Owner

Hi, I'm the developer but I've not been paying much attention. Do I need to do a thing here? I'm not very experienced with pull request etiquette.

@RobinWhitfield
Copy link

@cgutteridge, I guess that etiquette is that it's your software and you can do what you like with it! Review and approve or decline a merge as you see fit.

On the pull request, as I've now discovered that it's going to need some additional logic I'd not bother merging it.
If you're in any way interested in getting the software reliably working again then it'd be great to get your input on how to query and select the correct files (or maybe something can be done with the new format?)
I'm almost entirely lost with Perl and have so far just managed to work out some of what it's doing enough to get it somewhat working again.

@Orug28
Copy link
Author

Orug28 commented Jul 2, 2020

I don't know whether you had any success with that, but it does appear that the latest LIDAR data in some areas uses a different format to what this program expects. You can sanity check what it downloads in the DTM and DSM folders (they should look very similar, full of .asc files).

In my case for Leeds I found that I was actually getting the best results forcing the date to 2017 to get valid files.

i will find out this week what is going on and get back on whether your code has fixed it.

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

3 participants