Skip to main content

I have a workbench where I am reading data from a SDE looking for rows updated in the last 7 days then exporting to an excel file. That is working well. I’m also using mapnikrasteriser to create a map and export a tiff image however the new records have no geometry defined so won't show up on my map. 

 

What would be the best option to calculate geometry for those new records?

I’m not sure if I understand what you are looking for. There are several options to generate geometry, but what do you need? Do you want dummy geometry inserted in the boundingbox of the other data so it can be displayed on the map generated by the mapnikrasteriser?


I have a feature class that Im reading in however for some records the geometry hasn’t been calculated. so when I filter those records and then try to plot them they wont plot on a map generated by the mapnikrasteriser. So I potentially I need to create dummy geometry for those records only? Does that make more sense, apologies I’m quite new to FME and self taught.


@mandyvanross I guess to clarify the question is what does the geometry need to be?  If it needs to be created in the workspace from scratch, then use something like VertexCreator for Points, LineBuilder for Lines, AreaBuilder / 2DBoxReplacer for either an area defined by boundary lines or just a plain 2D Rectangle,  or use a Creator or GeometryReplacer (which take any Well Known Text geometry string) to create any custom geometry can think of.

However, it is extremely unusual to read a Feature Class using SDE and get no geometry on the output Features.  That sort of breaks the “rules” on the ArcGIS side in that all features in a feature class must have a single geometry type, with a valid, non-Null geometry for each Feature, which is why they are usually not encountered in an SDE read from an ArcGIS Feature Class.


I have a feature class that Im reading in however for some records the geometry hasn’t been calculated. so when I filter those records and then try to plot them they wont plot on a map generated by the mapnikrasteriser. So I potentially I need to create dummy geometry for those records only? Does that make more sense, apologies I’m quite new to FME and self taught.

I still have a hard time understanding your goal. Do you want to generate the geometry to write back to sde? Or to show them on the map? Does the records allready have x-y as attributes?


I do have x-y as attributes however the geometry hasn't been calculated as these are generally points added to feature layer via an editable web map. I thought I need the geometry to be calculated so the points will show on a map. This is my workflow below but when i add the output from my inline querier it gives me a weird image.

 

adding in inline querier output here - i think i need something inbetween

 


What is wrong with the result from the MapnikRasterizer? What did you expect as a result? When I need to do this I write the result to a file and check that file because the Inspector does display the result differently from what you see when opening the file.


Yes I’m writing to a tiff file and I get this when I add the features to mapnikRasteriser​​​​

 


To understand your issue, I need from you something like: “I expect this (printscreen of points how you have them) and I get this (printscreen of points you get from the MapnikRasterizer)”.

Because I do not have your data, it is very hard to understand what you need unless you very explicilty explain :)

I think your issue is that some of the points you are sending to the MapnikRasterizer do not have geometry, causing them to be set at 0,0 which makes the extents of the map huge and as a result not displaying anything.

You can test for this with a GeometryFilter. First try to send only the features with geometry to the MapnikRasterizer to see if it works as expected.

If this is the case, you’ll need to add geometry to the records without geometry. If the records have x/y or lon/lat fields, this can be done using the VertexCreator. You might also need to set the coordinate system using a CoordinateSystemSetter, but I’m not sure.


Yes it definitely works for features that have had the x y geometry calculated previously in arc pro. I will try the vertex creator, thanks for your ongoing support


Cheers, some of these things are hard. Everything MapnikRasterizer related is always difficult for me.

You can just place the VertexCreator between the GeometryFilter null outputport and the MapnikRasterizer inputport and be done.


We got it working. set the x and y values in the attribute manager, used geometry filter like you said to remove null geometries and added the vertex creator before mapnik and it worked!

 

 


Reply