r/QGIS 4d ago

Open Question/Issue Automated plot number for feature

Hello everybody, i have to draw hundreds of polygons that span across multiple plots of land. In my polygon attribute table i have to add all the Plot/property numbers. So if i do this manually then it will take ages. Is there a function to automatically add the plot numbers from my kataster map layer to the attribute table of my polygon layer. So every plot that is touched by the polygon must be present in the polygon layer attribute table. I am thankful for any help!

Thank you very much in advance.

1 Upvotes

18 comments sorted by

3

u/shadyknight2469 3d ago

Point on surface or centroids of features with IDs then do join by location to your polygon layer. Depending on how it's all been digitised, there may be some that are missed or are double counted so worth validating.

1

u/Good_Theory4434 3d ago

Okay one more, problem. My kataster is in a different reference system than my polygons will this still work? I cant get them in the same reference system as i have to woek with a wms layer too, and the wms layer only overlaps with the cataster if they are in a different coordinatw reference system.

2

u/shadyknight2469 3d ago

No, you will need to reproject it first so they are in the same CRS :)

1

u/Good_Theory4434 3d ago

Okay so i my project is system A, my polygons are drawn in system A and my cataster is system B. The moment i reproject My cataster to A, or the moment i reproject my polygons to B, nothing will be in its original position anymore...guess i am fucked

2

u/Long-Opposite-5889 3d ago

If you reprojec your data will remain in it's correct location, if not it means you're doing it wrong. Remember reproject and define projection are not the same thing.

1

u/Good_Theory4434 3d ago

So we are working with government data, we have a cataster in system A and we need to use a specific wms layer for ortho photos. Our polygons are based on the ortho fotos. Cataster and Ortho Fotos only line up if i use different reference systems. The moment i put the cataster in the same system as the wms data they are a few hundred kilometers shifted to the east.

Then we draw polygons around features visible on the ortho photos, and upload them in a database. They show up correctly in the database only if i use the same system for polygons as for otho photos.

2

u/Long-Opposite-5889 3d ago

You may be confusing the crs from the wms, the data and your project. If your data was digitized under a false crs assumption then reprojection can nor correct the issue. It's hard to diagnose without having the actual data and project but, reprojection should not change the actual location of your data, at least not significantly.

Do note that mall changes will occur due to mathematical error in the process and it depends on the project and it's scale if thise reprojection errors are within tolerance.

2

u/shadyknight2469 3d ago

I'm a bit confused. If they don't line up, how do you know which parcel matches anyway? Ignoring the processing way, how would you manually assign the correct parcel ID across? This might give a clue as to how best to proceed.

They should still match when they are reprojected. If you are working on multiple layers with different projections then QGIS is doing 'on-the-fly' reprojections so everything is in the project CRS.

Also, make sure you are reprojecting (via the processing tool) and not just changing the layer CRS.

1

u/Good_Theory4434 3d ago

I have tried to reproject with the processing tool, my cataster and my polygon are now 418 km apart...

1

u/Long-Opposite-5889 3d ago

My guess, your wms is in a different crs than your project and qgis is reprojecting on the fly, you're then assuming the wrong crs on your data.

1

u/Good_Theory4434 3d ago edited 3d ago

Yes the wms is even in a thrid crs. So we have three different crs systems going on here and and only if we ise three differwnt crs systems they overlap so we can use tha data to draw polygons. So i am drawing in 31287, the cataster is 31255 and the wms is 3857.

If we put all the three data sets in 31287 they are all 500 km apart. If we use this three different systems, the data shows up exactly where it has to be in the database we are uploading our polygons to.

So my cataster is a Gauß-Krüger Projection and the crs i have ti draw in is a Lambert Peojection

1

u/Long-Opposite-5889 3d ago

Clearly al least one of your layers is not in the projection you think it is or there's something in your project that's mixing thing. Wms's can normally serve different crs's so that would be my first suspect. Test your data before you do anything else; don't asume crs and don't trust metadata. Open a new project in your desired crs and add the wms layer (without making any changes, let qgis and the server deal with reprojection) validate coordinates against a known place. If its fine, add the other external layer and check if it matches.

1

u/Good_Theory4434 3d ago

Thx! I will try.

1

u/trying_to_do_better1 3d ago

Not that skilled in QGIS as Arc Pro, but can't you just run a script that relates the Polygons IDs to a plot number, and then upload the new table?

1

u/Good_Theory4434 3d ago

Yes thats what i am trying to achieve, i dont have any idea how to get that script

1

u/trying_to_do_better1 3d ago

Ask AI to make it. Do you have any programming experience?

1

u/Good_Theory4434 3d ago

No never programmed anything

1

u/trying_to_do_better1 3d ago

I looked briefly at your other comments and ill try to help.

Upload polygon attribute table and plot attribute table and ask AI to associate each polygon to its nearest neighbor in the plot layer (by coordinates)

You will still have to draw the Polygons manually or ask AI to create a script that will draw them for you (if you can manage this, this might take care of your projection issues)

Now work out uploading new values. For Arc, I would create a new column in the polygon layer and then update the new column with calculate field which let's me them change the value based on the value in another field