0

I'm trying to create a parcel table from coordinates. My MapBasic scripts are below. Why don't I get any results showing on the map?

Create Table "parsel" (Parsel_Adi Char(10)) file "D:\data\parsel\parsel.tab" TYPE NATIVE Charset "WindowsLatin1"
Create Map For parsel CoordSys Earth Projection 8, 28,"m", 33, 0, 0.9996, 500000, 0
Map from parsel
Set Map Layer parsel Editable On
Create Region Into Variable obj_parsel 0
Alter Object obj_parsel Node Add ( 417000, 4401000)
Alter Object obj_parsel Node Add ( 418000, 4401000)
Alter Object obj_parsel Node Add ( 417000, 4403000)
Alter Object obj_parsel Node Add ( 418000, 4400300)
Insert Into parsel(Object, Parsel_Adi) Values (obj_parsel, "SEMIH")
Commit Table parsel Interactive
1

You need to set the coordinate system, not only on the table but also for the MapBasic application.

You can do this simply by referrig to the coordinate system of your table

Create Map For parsel CoordSys Earth Projection 8, 28,"m", 33, 0, 0.9996, 500000, 0
Set Coordsys Table parsel
Map from parsel
0

Check coordinates of your polygon. You have coordinates that differs from defined coordinate system in coord.sys clause. [Turkish Coordinate Systems (UTM 6 Degree k = 0,9996 - ED50)]

It seems you are missing 3 from X coordinate ('417 000' should be '3 417 000')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.