Skip to main content
Solved

Reverse OpenCage Geocoder doesn't create polygons


Forum|alt.badge.img

Hi,

I am using the Geocoder for the first time and I get lot of warnings that feature must have at least 4 coordinates and then my output file has no coordinates.

I start with a shp file that has postal codes and centroid for each of the postal code and then I am doing reverse look up using the OpenCage API. I set up inside x and y as my Lat and long and and entered my API Key. Those are the only set ups I did in the Transformer.

Am I missing something? Can someone please help me?

Best answer by danilo_fme

Hi @jitkam,

Please, see the image below:

You can use the Workspace that I created - workspace-geocoder.fmwt

Thanks,

Danilo

View original
Did this help you find an answer to your question?

19 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • April 17, 2018

Hi @jitkam,

Could you share us a picture or your Workspace to understand better the configurations that you did?

Thanks,

Danilo


Forum|alt.badge.img
  • Author
  • April 17, 2018

Geocoder settings

 

 


Forum|alt.badge.img
  • Author
  • April 17, 2018

Workspace with the warnings sample

Forum|alt.badge.img
  • Author
  • April 17, 2018
danilo_fme wrote:

Hi @jitkam,

Could you share us a picture or your Workspace to understand better the configurations that you did?

Thanks,

Danilo

 

Hi Danilo, just did

 

 

Thx

 

Jitka

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • April 17, 2018
jitkam wrote:

 

Hi Danilo, just did

 

 

Thx

 

Jitka
Thanks @jitkam

 

I created here a Workspace: Read polygons from Shapefile -> Transformer CenterPointExtractor -> Geocoder .

 

 

 

Results in FME Data Inspector:

 

 

 

Thanks,

 

Danilo

 

 


Forum|alt.badge.img
  • Author
  • April 17, 2018

@danilo,

I have the same Geocoder settings. Do you think the problem is with my source file?


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • April 17, 2018
jitkam wrote:

@danilo,

I have the same Geocoder settings. Do you think the problem is with my source file?

@jitkam

 

 

Cloud you send me some polygons to test?

 


Forum|alt.badge.img
  • Author
  • April 18, 2018

@danilo_fme, here is the sample

Thank you

Jitka

archive.zip


Forum|alt.badge.img
  • Author
  • April 18, 2018

@danilo_fme

here is the sample,

thank you

Jitka

archive.zip


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • April 18, 2018
jitkam wrote:

@danilo_fme

here is the sample,

thank you

Jitka

archive.zip

Hi @jitkam

 

 

Thanks your source data. I used it in my Workspace - reading the shape file.

 

 

After the transformer CenterPointExtractor was used to extract the coordinates X and Y.

 

 

And the results was returned after the geocode process:

 

 

 

Your Writer is a point geometry, correct?

 

 

Thanks,

 

Danilo

 


Forum|alt.badge.img
  • Author
  • April 18, 2018
danilo_fme wrote:
Hi @jitkam

 

 

Thanks your source data. I used it in my Workspace - reading the shape file.

 

 

After the transformer CenterPointExtractor was used to extract the coordinates X and Y.

 

 

And the results was returned after the geocode process:

 

 

 

Your Writer is a point geometry, correct?

 

 

Thanks,

 

Danilo

 

Hi Danilo,

 

actually, should be polygons. I did exact the same setting as you show above and used the sample I sent you and still I get the errors and no output file.

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • April 19, 2018
jitkam wrote:
Hi Danilo,

 

actually, should be polygons. I did exact the same setting as you show above and used the sample I sent you and still I get the errors and no output file.

 

 

Its possible that your writer file is set like polygon geometry. Could you share your Writer file? I believe you are try to write point in polygon Writer.

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • April 19, 2018

Hi @jitkam,

Did you change the format of geometry in your Writer?

Thanks,

Danilo


Forum|alt.badge.img
  • Author
  • April 19, 2018
danilo_fme wrote:
Its possible that your writer file is set like polygon geometry. Could you share your Writer file? I believe you are try to write point in polygon Writer.

 

 

Hi @danilo_fme I've uploaded the output file and screenshot of my settings.

 

I was originally using FME2018, but now tried in 2017, having the same problem.

 

Thx!

 

archive-2.zip

 

screen-shot-2018-04-19-at-111605-am.png

 


Forum|alt.badge.img
  • Author
  • April 19, 2018
danilo_fme wrote:
Its possible that your writer file is set like polygon geometry. Could you share your Writer file? I believe you are try to write point in polygon Writer.

 

 

This is one of the messages I receive in warning.

 

p, li { white-space: pre-wrap; } Polygon feature must have at least 4 coordinates...rejecting

 

REJECTING BELOW FEATURE:

 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Feature Type: `CP_15Mex_v3_sample_15_2017'

 

Attribute(encoded: utf-8) : `_address' has value `Emilio Portes Gil, San Felipe del Progreso, Mexico'

 

Attribute(64 bit real) : `_inside_x' has value `-99.919066897024351'

 

Attribute(64 bit real) : `_inside_y' has value `19.646801735532826'

 

Attribute(64 bit real) : `_latitude' has value `19.6449664'

 

Attribute(64 bit real) : `_longitude' has value `-99.9192053'

 

Attribute(encoded: utf-8) : `d_cp' has value `50680'

 

Attribute(string) : `fme_feature_type' has value `CP_15Mex_v3_sample_15'

 

Attribute(string) : `fme_geometry' has value `fme_point'

 

Attribute(entangled: string): `fme_type' has value `fme_point'

 

entangled to [SHAPE_GEOMETRY]

 

Attribute(string) : `multi_writer_id' has value `0'

 

Coordinate System: `LL84'

 

Geometry Type: IFMEPoint

 

Coordinate Dimension: 2

 

(-99.9192053,19.6449664)

 

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • April 19, 2018

Hi @jitkam,

 

I solved you problem now using a transformer FeatureMerger.

This transformer is responsible to merger informations between points geometry ( results from transformer Geocoder ) and Polygons ( source data ) respecting a unique attribute d_cp.

Your Writer is a polygon geometry with all attributes.

Attached the Workspace - workspace-geocoder.fmwt

Thanks,

Danilo

 


Forum|alt.badge.img
  • Author
  • April 19, 2018
danilo_fme wrote:

Hi @jitkam,

 

I solved you problem now using a transformer FeatureMerger.

This transformer is responsible to merger informations between points geometry ( results from transformer Geocoder ) and Polygons ( source data ) respecting a unique attribute d_cp.

Your Writer is a polygon geometry with all attributes.

Attached the Workspace - workspace-geocoder.fmwt

Thanks,

Danilo

 

Thank you @danilo_fme,

 

does the FeatureMerger also needs Supplier? Should I use the Geocoder as such?

 

 

Thx

 

Jitka

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • Best Answer
  • April 20, 2018

Hi @jitkam,

Please, see the image below:

You can use the Workspace that I created - workspace-geocoder.fmwt

Thanks,

Danilo


Forum|alt.badge.img
  • Author
  • April 23, 2018
danilo_fme wrote:

Hi @jitkam,

Please, see the image below:

You can use the Workspace that I created - workspace-geocoder.fmwt

Thanks,

Danilo

Thank you @danilo_fme,

 

it works!!!

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings