copy infomation in Mapinfo !

MapInfo, MapBasic
Ответить
Аватара пользователя
hoangdiep
Новоприбывший
Сообщения: 5
Зарегистрирован: 01 сен 2011, 04:23
Репутация: 0

copy infomation in Mapinfo !

Сообщение hoangdiep »

I want information of the class and copy this data pasted into other data layers, is there a way to do it? you please help me!
Аватара пользователя
Игорь Белов
Гуру
Сообщения: 2240
Зарегистрирован: 04 янв 2011, 22:00
Репутация: 1513
Откуда: Казань

Re: copy infomation in Mapinfo !

Сообщение Игорь Белов »

Fisrt method:
1. Make layer A editable.
2. Select objects from layer B.
3. Copy and paste.

Second method:
1. Select objects from layer B.
2. [Table] → [Append Rows to Table...] and choose tables Selection as source and A as target.
The purpose of computing is insight, not numbers
Аватара пользователя
hoangdiep
Новоприбывший
Сообщения: 5
Зарегистрирован: 01 сен 2011, 04:23
Репутация: 0

Re: copy infomation in Mapinfo !

Сообщение hoangdiep »

thank you!
but me want to copy the property not is the map!
Аватара пользователя
Игорь Белов
Гуру
Сообщения: 2240
Зарегистрирован: 04 янв 2011, 22:00
Репутация: 1513
Откуда: Казань

Re: copy infomation in Mapinfo !

Сообщение Игорь Белов »

What do you mean by "property"? Object style such as colour or attribute data from table?
The purpose of computing is insight, not numbers
Аватара пользователя
hoangdiep
Новоприбывший
Сообщения: 5
Зарегистрирован: 01 сен 2011, 04:23
Репутация: 0

Re: copy infomation in Mapinfo !

Сообщение hoangdiep »

Yes ! I want it !
Аватара пользователя
Игорь Белов
Гуру
Сообщения: 2240
Зарегистрирован: 04 янв 2011, 22:00
Репутация: 1513
Откуда: Казань

Re: copy infomation in Mapinfo !

Сообщение Игорь Белов »

Suppose we wish to convey object styles. I would prefer MapCAD. If your MapInfo version is 9.5, you have to install MapCAD from installation CD. If newer, then MapCAD is already at hand. In both cases you must activate it by tool manager:
[Tools] → [Tool Manager…]
New toolbars appear: MapCAD and Objects. Find Copy Style and Paste Style buttons.
  • Select model object
  • Press Copy Style
  • Make wanted layer editable
  • Select target object(s)
  • Press Paste Style
MapCAD comes with comprehensive help.
Вложения
MapCAD.png
MapCAD.png (22.67 КБ) 7511 просмотров
The purpose of computing is insight, not numbers
Аватара пользователя
hoangdiep
Новоприбывший
Сообщения: 5
Зарегистрирован: 01 сен 2011, 04:23
Репутация: 0

Re: copy infomation in Mapinfo !

Сообщение hoangdiep »

Thank you !
But I want copy attribute data from table !
Аватара пользователя
Игорь Белов
Гуру
Сообщения: 2240
Зарегистрирован: 04 янв 2011, 22:00
Репутация: 1513
Откуда: Казань

Re: copy infomation in Mapinfo !

Сообщение Игорь Белов »

SQL Queries 1
In fisrt sample we shall add new field.
I have a map layer ‘Country’ with the attribute table of the sort

Код: Выделить всё

ID Code
 1    2
 2    3
 3    1
 4    1
 5    2
 6    2
and I have a table ‘Classes’ of all code meanings:

Код: Выделить всё

No Descriptio
 1 Water
 2 Forest
 3 Field
Let's apply SQL query:
[Query] → [SQL Select…]
(see picture below for details) and obtain ‘Country2’ table:

Код: Выделить всё

ID Code Descriptio
 1    2 Forest
 2    3 Field
 3    1 Water
 4    1 Water
 5    2 Forest
 6    2 Forest
Let's save ‘Country2’:
[File] → [Save Copy As…]
Вложения
Country2.png
Country2.png (5.6 КБ) 7489 просмотров
The purpose of computing is insight, not numbers
Аватара пользователя
Игорь Белов
Гуру
Сообщения: 2240
Зарегистрирован: 04 янв 2011, 22:00
Репутация: 1513
Откуда: Казань

Re: copy infomation in Mapinfo !

Сообщение Игорь Белов »

SQL Queries 2
In second sample we shall fill existing field.
I have a map layer ‘Country’ with the attribute table of the sort:

Код: Выделить всё

ID Code Feature
 1    2 NULL
 2    3 NULL
 3    1 NULL
 4    1 NULL
 5    2 NULL
 6    2 NULL
and I have a table ‘Classes’ of all code meanings:

Код: Выделить всё

No Descriptio
 1 Water
 2 Forest
 3 Field
Let's apply SQL query:
[Query] → [SQL Select…]
(see picture below for details) and obtain ‘Query1’ table:

Код: Выделить всё

ID Code Feature Descriptio
 1    2 NULL    Forest
 2    3 NULL    Field
 3    1 NULL    Water
 4    1 NULL    Water
 5    2 NULL    Forest
 6    2 NULL    Forest
Now modify ‘Query1’ table filling ‘Feature’ column with ‘Descriptio’ values:
[Table] → [Update Column…]
(see second picture below for details).

Код: Выделить всё

ID Code Feature Descriptio
 1    2 Forest  Forest
 2    3 Field   Field
 3    1 Water   Water
 4    1 Water   Water
 5    2 Forest  Forest
 6    2 Forest  Forest
Eventually save ‘Country’:
[File] → [Save Table…]
Вложения
Query1.png
Query1.png (5.67 КБ) 7488 просмотров
UpdateColumn.png
UpdateColumn.png (3.57 КБ) 7488 просмотров
The purpose of computing is insight, not numbers
Ответить

Вернуться в «MapInfo»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 0 гостей