Hi,
I may not be clear on your requirement...
"summarise the number of points by attribute in each polygon" this can be attained by considering _overlaps attribute (Overlap Count Attribute) from PointOnAreaOverlayer.
Or does this mean that few attributes does not values and few have values?
Could you post a sample of your input and desired output? I think that'll make it a lot more clear.
I think what you looking for is the option 'Generate List On Output Area' that can be found at the bottom in the 'Attribute Accumulation' part. However you must appoint the attributes that should be a part of that list.
I think your question should say "does this mean that some attributes do not have values and some have values". If this is what you are asking me, then no my issue is not that there are missing attribute values.
I recall having tried to use the Overlap Count Attribute but I don't know how to get anything useful from it. I gather that this terminology means a point overlaps with a polygon?
Essentially what I am trying to do is boundary tag points and then sum the counts of these points by attribute against each polygon.
Thank you, this is a good tip. I have had some promising results by following a tutorial that includes generate list.
I will post some data, I just need to edit it first.
points-and-polygons.zipAttached is a zip file containing the input files, process and final result.
Inputs-
Points.TAB
Polygons.TAB
Process-
The following SQL creates a count of those points with Indicator 1 = "1", the result being a sum of the number of points by polygon - result is PolycountsI1.TAB
SELECT Polygons.Name, Count(*)
FROM Polygons, Points
WHERE Polygons.Obj Contains Points.Obj AND Points.Indicator1="1"
GROUP BY Polygons.Name
Then the SQL code is used to count those points with Indicator 1 = "2" - result is PolycountsI2.TAB
PolycountsI1.TAB and PolycountsI2.TAB do not have geometry, they are attributes only.
Final outputs:
PolycountsI1.TAB and PolycountsI2.TAB are then joined to the original Polygons table - the final result is a table with geometry - PolygonsI1_I2.TAB
Thanks again.
Hi @sladlow,
Based on the output required, I have prepared the workbench and attached to this thread. I have connected to the inspector, if it meets, change the writer as required...
Hope this helps
tab-overlap-extract.fmw
points-and-polygons.zipAttached is a zip file containing the input files, process and final result.
Inputs-
Points.TAB
Polygons.TAB
Process-
The following SQL creates a count of those points with Indicator 1 = "1", the result being a sum of the number of points by polygon - result is PolycountsI1.TAB
SELECT Polygons.Name, Count(*)
FROM Polygons, Points
WHERE Polygons.Obj Contains Points.Obj AND Points.Indicator1="1"
GROUP BY Polygons.Name
Then the SQL code is used to count those points with Indicator 1 = "2" - result is PolycountsI2.TAB
PolycountsI1.TAB and PolycountsI2.TAB do not have geometry, they are attributes only.
Final outputs:
PolycountsI1.TAB and PolycountsI2.TAB are then joined to the original Polygons table - the final result is a table with geometry - PolygonsI1_I2.TAB
Thanks again.
@sladlow This is the way I should do it in FME.
And the resulting table
@lars_de_vries
Hi Lars, thanks so much for this, it really helps. I doubt i would have been able to work this out alone.
Would you mind clarifying a few things for me? Can you please tell me the parameters of the spatial output step at the end, and also how you set the Attribute Value to 2 Possible Values in the Attribute Manager transformer?
Thanks,
Sean
@pratap
Hi Pratap, this is also really helpful, thanks. While i can see the attributes of the polygons summed in the inspector, when I added a writer to the end of the process that saves the file as a TAB file, the resulting file does not display any summed attributes.
Sean
Hi @sladlow,
You have to add the attributes in the writer. I have added the TAB writers along with attributes. I do not have MapInfo to check the result but I have viewed the TAB files in Inspector.
Hope this helps...
tab-overlap-extract-1.fmw
Pratap
Hi,
Just out of curiosity, I have prepared similar to @lars_de_vries approach and attached
tab-overlap-extract-2.fmw
Hi @pratap, where are the attributes added in the writer? I can't see anything that would indicate the ability to add attributes in the writer.
Hi,
Hope you are looking at tab-overlap-extract-1.fmw and attribute information is provided in writer properties as given below...
I don't know, this doesn't work either. I re-downloaded your workspace, pointed the process to the original polygons file and manually added the points file again. I created a new writer that points to the relevant output directory, but it can't write because it is looking for E:\\Temp, which of course doesn't exist. I can't see any reference to an E drive in the workspace. ??
Hi,
No need to change the readers/writers but change the file path in published parameters and then run.
I set the Destination MapInfo folder to the correct drive in Tools-Edit Parameters. Is this what you meant? No file was created, even though the translation was successful.
Thread is too long :)
Can I have your skype ID or email ID for further discussion...
Sorry about this. When we got FME I was assured that it was easy to use and that the online support and documentation was very comprehensive, which it is. But I probably need to do some kind of course that covers the basics because I can't seem to get it to work. Do you want me to put my email address in this post?
I understood, Don't worry, It is simple...
Yes please... If you have Skype then it is preferable...
You can get my email ID from my profile view
Hi, what I think is your profile doesn't have an email address listed. My email address is , I don't have access to Skype at work. I could try at home another time.
Sorry about this. When we got FME I was assured that it was easy to use and that the online support and documentation was very comprehensive, which it is. But I probably need to do some kind of course that covers the basics because I can't seem to get it to work. Do you want me to put my email address in this post?
With regards to training, I would highly recommend you watch and work along with one of the recorded training courses, or a live online one:
https://www.safe.com/training/recorded/
That should get you up to speed quickly.
Hi @sladlow,
sorry for not responding anymore, but I have been sick for a couple of days and haven't had a look at any computer. Thank you @pratap for continuing to answer the questions.
I think it is really important to learn the basics, like @redgeographics already mentioned too you, to understand every step that has been taken. And also to understand the way FME works.
If you still have issues, please let the community know.
And when I look at the thread your question, @sladlow, about how I set the '2 possible values' had not been answered yet. You can do that using Conditional Statements, those are TestFilters within the AttributeCreator and -Manager, and also many other transformers, that allow you to define an output based on different conditions.
Thanks @redgeographics I will work through these.