returns location of node. If node geometry is not a point a center  point will be returned
350514
def point(self):
        
        if not self.geometry:
            raise ValueError('geometry attribute must be set before trying to get point property')
        if self.geometry.geom_type == 'Point':
            return self.geometry
        else:
            try:
                # point_on_surface guarantees that the point is within the geometry
                return self.geometry.point_on_surface
            except GEOSException:
                # fall back on centroid which may not be within the geometry
                # for example, a horseshoe shaped polygon
                return self.geometry.centroid
947627
def dposition(self, node, dcol=0):
        """"""
        nnode = self.dnode(node)
        return (nnode.lineno, nnode.col_offset + dcol)
694847
def getCenter(self):
        '''
        
        '''

        (left, top), (right, bottom) = self.getCoords()
        x = left + (right - left) / 2
        y = top + (bottom - top) / 2
        return (x, y)
731541
function prevPoint(point, isSkipInnerOffset) {
  let node;
  let offset;

  if (point.offset === 0) {
    if (isEditable(point.node)) {
      return null;
    }

    node = point.node.parentNode;
    offset = position(point.node);
  } else if (hasChildren(point.node)) {
    node = point.node.childNodes[point.offset - 1];
    offset = nodeLength(node);
  } else {
    node = point.node;
    offset = isSkipInnerOffset ? 0 : point.offset - 1;
  }

  return {
    node: node,
    offset: offset,
  };
}
739339
Point2D getCenter() {
        final Rectangle2D bounds = getBounds();
        return new Point2D.Double(bounds.getCenterX(), bounds.getCenterY());
    }
592568
public Point getCenter() {
        Point upperLeft = this.getLocation();
        Dimension dimensions = this.getSize();
        return new Point(upperLeft.getX() + dimensions.getWidth() / 2,
            upperLeft.getY() + dimensions.getHeight() / 2);
    }
567030
def b(self):
        '''
        

        '''
        b = Point(self.center)

        if self.xAxisIsMinor:
            b.x += self.minorRadius
        else:
            b.y += self.minorRadius
        return b
1107311
def get_position():
    
    e = Quartz.CGEventCreate(None)
    point = Quartz.CGEventGetLocation(e)
    return (point.x, point.y)
868253
def _get_node(self):
        """"""
        data = self.meta.read(self.node_size)
        return PFSNode(data, self.endianness)
1107749
@Transient
    private Feature getLocation() {
        if (geometry == null) {
            return null;
        }
        final List<Feature> features = geometry.getFeatures();
        if (features == null || features.isEmpty()) {
            return null;
        }
        return features.get(0);
    }
206979
Point determineClosestCentre(Point p, Point centreA, Point centreB){
		
		//loop counter variable
		int l;	

		//stores the distance between p and centreA
		double distanceA = 0.0;

		for(l=0;l<p.dimension;l++){
			//centroid coordinate of the point
			double centroidCoordinatePoint;
			if(p.weight != 0.0){
				centroidCoordinatePoint = p.coordinates[l] / p.weight;
			} else {
				centroidCoordinatePoint = p.coordinates[l];
			}
			//centroid coordinate of the centre
			double centroidCoordinateCentre;
			if(centreA.weight != 0.0){
				centroidCoordinateCentre = centreA.coordinates[l] / centreA.weight;
			} else {
				centroidCoordinateCentre = centreA.coordinates[l];
			}

			distanceA += (centroidCoordinatePoint-centroidCoordinateCentre) * 
					(centroidCoordinatePoint-centroidCoordinateCentre) ;
		}

		//stores the distance between p and centreB
		double distanceB = 0.0;

		for(l=0;l<p.dimension;l++){
			//centroid coordinate of the point
			double centroidCoordinatePoint;
			if(p.weight != 0.0){
				centroidCoordinatePoint = p.coordinates[l] / p.weight;
			} else {
				centroidCoordinatePoint = p.coordinates[l];
			}
			//centroid coordinate of the centre
			double centroidCoordinateCentre;
			if(centreB.weight != 0.0){
				centroidCoordinateCentre = centreB.coordinates[l] / centreB.weight;
			} else {
				centroidCoordinateCentre = centreB.coordinates[l];
			}

			distanceB += (centroidCoordinatePoint-centroidCoordinateCentre) * 
					(centroidCoordinatePoint-centroidCoordinateCentre) ;
		}

		//return the nearest centre
		if(distanceA < distanceB){
			return centreA;
		} else {
			return centreB;
		}
	}
139019
def isConjNorthNode(self):
        
        node = self.chart.getObject(const.NORTH_NODE)
        return aspects.hasAspect(self.obj, node, aspList=[0])
748614
def surrounding_nodes(self, position):
        

        n_node_index, n_node_position, n_node_error = self.nearest_node(position)

        if n_node_error == 0.0:

            index_mod = []

            for i in range(len(n_node_index)):

                new_point = np.asarray(n_node_position)
                new_point[i] += 1.e-5*np.abs(new_point[i])

                try:
                    self.nearest_node(tuple(new_point))
                    index_mod.append(-1)
                except ValueError:
                    index_mod.append(1)

        else:
            # Check if node_position is larger or smaller in resp. axes than position

            index_mod = []

            for i in range(len(n_node_index)):
                if n_node_position[i] > position[i]:
                    index_mod.append(-1)
                else:
                    index_mod.append(1)

        return tuple(n_node_index), tuple(index_mod)
1168681
def centre(self):
        """"""
        return self.p2s(self.canvasx(self.width / 2.0)), self.p2s(self.canvasy(self.height / 2.0))
618301
def nodeAt( self, point ):
        
        items = self.items(point)
        for item in items:
            if ( isinstance(item, XNode) ):
                return item
        return None
289886
def retrieve_element(self, location):
        
        loc_descriptor = self._get_location_descriptor(location)
        # find node
        node = self._get_node(loc_descriptor)
        return node.get_element()
1220031
public Coordinate getCenterPoint() {
		double centerX = (width == 0 ? x : x + width / 2);
		double centerY = (height == 0 ? y : y + height / 2);
		return new Coordinate(centerX, centerY);
	}