span8
span4
span8
span4
I'm making a standardized excel sheet that can easily transform my incoming data/features into data/features that i want in my own style. Transforming code into text, dates or numbers depending on the output style row in my translation table.
我有以下excel表样式我用于翻译:
category_old | value_old | category_new. | sort_of_data | value_new. | note_about how this should worl |
date | date_of_construction | date | dates are just copied | ||
road_tpe | asphalt | road_type | existing_list | 01 | This list is already known in my database |
road_tpe | 具体的 | road_type | existing_list | 02 | This list is already known in my database |
road_te | elements | road_type | existing_list | 03 | This list is already known in my database |
dmg | A | damage_asphalt | 分裂 | 01 | 如果道路==沥青填充相同的价值 |
dmg | B | damage_asphalt | 分裂 | 02 | 如果道路==沥青填充相同的价值 |
dmg | A | dardite_concrete. | 分裂 | 01 | 如果道路==混凝土填充相同的价值 |
name | 街道名称 | new_list. | Make a table with all uniqeu streets and count them 1 till x and add the matching number to the table | ||
and the following attribute table for features:
ID | date | road_tpe | dmg | name |
1 | 11-11-2016 | elements | A street | |
2 | 11-11-2016 | asphalt | B | A street |
3 | 11-11-2016 | asphalt | A | B street |
4 | 11-11-2016 | 具体的 | A | C street |
The result should look like
ID | date_of_construction | road_type | damage_asphalt | dardite_concrete. | 街道名称 |
1 | 11-11-2016 | 03 | 无效的 | 无效的 | 01 |
2 | 11-11-2016 | 01 | 02 | 无效的 | 01 |
3 | 11-11-2016 | 01 | 01 | 无效的 | 02 |
4 | 11-11-2016 | 02 | 无效的 | 01 | 03 |
我目前编写SQL代码加入Inlinequerier中的数据,并在此之后手动添加所有变压器,但它与巨型表一起工作。我正试图让这完全自动,但陷入困境。输入应该是数据集的自定义翻译表,用于数据集命名AL的标准和输出应该始终是SHP,并且在这种情况下也是街道名称的额外翻译表(ID,Street_Name [文本中]和代码)。是否可以将InLinequerier中的信息与列表(如UniquevaluelueLogger)进行适应性
谢谢你的答案,我现在正在研究Schemamapper。它看起来像一个很好的选择,但它看起来你仍然需要按名称命名过滤器中的属性。我想知道我是否可以使其更加动态,并且基于Excel中已经给出的值:
If sort_of_date == date: string(category_new[1]) = date ##meaning: date_of_construction takes over the values of date for road_tpe this should be something like: If sort_of_date == existing_list: *** make list of unique values based on the category_old and Value_old for i in (length list) if value_old of road_tpe == value_old_list[i] value_old = value_new if sort_of_date == split: split that takes road_tpe into account (road_tpe should be stored in a extra attributes split_category and split_value) after that its the same as above if sort_of_date == new_list: makes a list of all unique values and makes a new table of it that will be exported (name, code, order) the code is just a count transformer order is the list in alphabetical order after this all street names should be replaced by the code.
Hi@jdh009, I think that the InlineQuerier does the trick if you add a small preprocess. e.g.
然后,使用此设置执行Inlinequerier的SQL语句。
select a.*, b.value_new as road_type, case when a.road_tpe = 'asphalt' then c.value_new else null end as damage_asphalt, case when a.road_tpe = 'concrete' then c.value_new else null end as damage_concrete, d.street_name as street_name from Feature as a inner join (select value_old, value_new from Style where category_old = 'road_tpe') as b on b.value_old = a.road_tpe left outer join (select value_old, value_new, category_new from Style where category_old = 'dmg') as c on c.value_old = a.dmg and c.category_new like '%'||a.road_tpe inner join Street as d on d.name = a.name order by a.ID
This sounds like something theSchemaMapper可以解决的问题。考虑你already have your mapping table in Excel it might be relatively easy to set up. That page I linked to has some tutorials as well as use cases.
希望这可以帮助。
© 2019 Safe Software Inc |Legal