Skip to content

Conversation

@IlkaCu
Copy link
Member

@IlkaCu IlkaCu commented Mar 26, 2018

This should fix the problem described in #243

@IlkaCu IlkaCu requested a review from wolfbunke March 26, 2018 12:37
@nesnoj
Copy link
Member

nesnoj commented Mar 26, 2018

Why would you set a different SRID on single cells? Isn't it better to transform it to 3035?

@IlkaCu
Copy link
Member Author

IlkaCu commented Mar 26, 2018

The column 'geom' has the SRID 4326. The problem described in #243 occurred because single cells where transformed to 3035 - therefore I changed it back to 4326.

@IlkaCu IlkaCu self-assigned this Mar 26, 2018
@IlkaCu IlkaCu added the bug label Mar 26, 2018
@IlkaCu IlkaCu added this to the Release ego v0.3.1 milestone Mar 26, 2018
@nesnoj
Copy link
Member

nesnoj commented Mar 26, 2018

I don't get it. The CREATE-statement says it's 3035.

If I'm not mislead, the correct one is

ST_Transform(ST_SetSRID(ST_MakePoint(6.48, 53.69), 4326), 3035)

because you say this point is WGS84, then you transform to ETRS (which is the SRID of the column geom). Not sure if this (extra?) transformation is necessary?

@wolfbunke
Copy link

But the table is using SRID 3035 https://github.com/openego/data_processing/blob/dev/preprocessing/sql_snippets/ego_dp_preprocessing_res_powerplant.sql#L42 . As fare I remember we changed it to have the rea scripts faster and change the geom later back to SRID 4326 .

I think @nesnoj is right the problem is mixing WGS lon/lat (4326) and SRID 3035.

@IlkaCu
Copy link
Member Author

IlkaCu commented Mar 26, 2018

I didn't notice the SRID in the Create-Statement - in the database it is 4326. Confusing!
But as you can see I changed the code according to @nesnoj's remarks.

@wolfbunke wolfbunke merged commit 1268752 into dev Mar 26, 2018
@IlkaCu IlkaCu deleted the bugfix/change_srid branch March 26, 2018 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants