Skip to main content
Solved

Two X - y Values for each attribute

  • July 5, 2016
  • 10 replies
  • 33 views

Forum|alt.badge.img

Hello All,

I have two X (Longitude) and Y (Latitude) values of each attribute. The first X & Y shows for the pickup location whereas the second one is for the drop off location. How can I get MITAB format file that shows pickup and dropoff in different colors? Also, I want to measure a direct distance between them. I tried AttributeProjector but it gives me only one x and Y attribute. Here is the sample of my data:

Best answer by takashi

Hi @gsgoraya,

  • Distance calculation: You can use two AttributeReprojectors for 'pickup' and 'dropoff' and then calculate the length.
  • Colors: If you create two points (pickup and dropoff) for each record, you can set different colors to them.

e.g.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

takashi
Celebrity
  • Best Answer
  • July 6, 2016

Hi @gsgoraya,

  • Distance calculation: You can use two AttributeReprojectors for 'pickup' and 'dropoff' and then calculate the length.
  • Colors: If you create two points (pickup and dropoff) for each record, you can set different colors to them.

e.g.


Forum|alt.badge.img
  • Author
  • July 6, 2016

Hi @gsgoraya,

  • Distance calculation: You can use two AttributeReprojectors for 'pickup' and 'dropoff' and then calculate the length.
  • Colors: If you create two points (pickup and dropoff) for each record, you can set different colors to them.

e.g.

Thank you Takashi. It works for me. I really appreciate your help.

Gurpreet


Forum|alt.badge.img
  • Author
  • July 6, 2016

Hi @gsgoraya,

  • Distance calculation: You can use two AttributeReprojectors for 'pickup' and 'dropoff' and then calculate the length.
  • Colors: If you create two points (pickup and dropoff) for each record, you can set different colors to them.

e.g.

Hello Takashi,

I tried to write on GeoMedia Warehouse, but seems to me it is not written accordingly. Here is the translation log:


takashi
Celebrity
  • July 7, 2016

Hello Takashi,

I tried to write on GeoMedia Warehouse, but seems to me it is not written accordingly. Here is the translation log:

Hi @gsgoraya, from the log, seems the Geometry parameter in the writer feature type is set to fm0_none, although the feature geometry is point. Try changing the parameter to fm0_point. In addition, the parameter setting for ExpressionEvaluator is not completed (the properties button is red). Set the math expression appropriately.


Forum|alt.badge.img
  • Author
  • July 7, 2016

Hi @gsgoraya,

  • Distance calculation: You can use two AttributeReprojectors for 'pickup' and 'dropoff' and then calculate the length.
  • Colors: If you create two points (pickup and dropoff) for each record, you can set different colors to them.

e.g.

logfile.txt

Hello @

Takashi,

Thank you for the advise. I changed geometry from fm0_none to fm0_Point. The process is failing. I tried about 3 to 4 times but no luck. I have attached log file and expression couple other screenshots. Sorry to bother you.

Gurpreet


takashi
Celebrity
  • July 8, 2016

logfile.txt

0684Q00000ArMmeQAF.jpg

Hello @

0684Q00000ArMmjQAF.jpg

Takashi,

Thank you for the advise. I changed geometry from fm0_none to fm0_Point. The process is failing. I tried about 3 to 4 times but no luck. I have attached log file and expression couple other screenshots. Sorry to bother you.

Gurpreet

Hi @gsgoraya, according to this part of the log

GeoMedia Writer: Writing to Existing GeoMedia Warehouse version 5
Table TRAPEZE_DATS_TRIP_DATA_2015 exists, appending features...
GeoMedia Writer: Failed to determine Geometry field name for 'TRAPEZE_DATS_TRIP_DATA_2015' table
A fatal error has occurred. Check the logfile above for details 

I guess that the destination GeoMedia table exists and the schema of the table does not match the writer feature type configuration. If you will create a new table or overwrite the existing table in the destination GeoMedia dataset, try setting 'YES' to the 'Drop Table' parameter in the writer feature type.


Forum|alt.badge.img
  • Author
  • July 11, 2016

Hi @gsgoraya, according to this part of the log

GeoMedia Writer: Writing to Existing GeoMedia Warehouse version 5
Table TRAPEZE_DATS_TRIP_DATA_2015 exists, appending features...
GeoMedia Writer: Failed to determine Geometry field name for 'TRAPEZE_DATS_TRIP_DATA_2015' table
A fatal error has occurred. Check the logfile above for details 

I guess that the destination GeoMedia table exists and the schema of the table does not match the writer feature type configuration. If you will create a new table or overwrite the existing table in the destination GeoMedia dataset, try setting 'YES' to the 'Drop Table' parameter in the writer feature type.

@takashi, Thank you for all your help. I was able to write the file. 


Forum|alt.badge.img
  • Author
  • July 11, 2016

Hi @gsgoraya, according to this part of the log

GeoMedia Writer: Writing to Existing GeoMedia Warehouse version 5
Table TRAPEZE_DATS_TRIP_DATA_2015 exists, appending features...
GeoMedia Writer: Failed to determine Geometry field name for 'TRAPEZE_DATS_TRIP_DATA_2015' table
A fatal error has occurred. Check the logfile above for details 

I guess that the destination GeoMedia table exists and the schema of the table does not match the writer feature type configuration. If you will create a new table or overwrite the existing table in the destination GeoMedia dataset, try setting 'YES' to the 'Drop Table' parameter in the writer feature type.

@takashi, sorry to bother you again. Can I change the pickup and drop off points' color and draw polylines between them in FME? Thank you in advance.

goraya

0684Q00000ArNUBQA3.jpg


takashi
Celebrity
  • July 12, 2016

logfile.txt

Hello @

Takashi,

Thank you for the advise. I changed geometry from fm0_none to fm0_Point. The process is failing. I tried about 3 to 4 times but no luck. I have attached log file and expression couple other screenshots. Sorry to bother you.

Gurpreet

Hi @gsgoraya,

  • You can use the FeatureColorSetter to change color for each point.
  • You can create a polyline - by connecting points using the PointConnector, - or by joining line segments using the LineJoiner. However, you cannot set different colors for individual vertices belonging to a single polyline.

Which points should be connected to form a polyline?


Forum|alt.badge.img
  • Author
  • July 12, 2016

Hi @gsgoraya,

  • You can use the FeatureColorSetter to change color for each point.
  • You can create a polyline - by connecting points using the PointConnector, - or by joining line segments using the LineJoiner. However, you cannot set different colors for individual vertices belonging to a single polyline.

Which points should be connected to form a polyline?

Hi @takashi , thank you for your response. As you see in the sample spreadsheet, every row has unique bookingid. I want to create polylines between the pickup and dropoffs. So I can see the trend where these persons were picked up and where did they go. That is why I also want to label all pick up with one color and the drop off with the other color. Let me know if you have any other questions. Thanks

Goraya